- Home /
 
               Question by 
               yacobkennedy · Apr 26, 2021 at 08:57 PM · 
                animationtriggerdoor  
              
 
              How do I stop an animation triggering for all the objects that share it?
So in the picture attached is my simple door opening and closing script. My issue I'm having is when I copy and paste my door object with the script attached, whenever I trigger one door the ones duplicated before it trigger also. So 1 triggers fine, but 2 triggers 2 and 1, 3 triggers 3 2 and 1, and so on. Hope that made sense. How do I avoid this? I tried turning off the animator component for all doors and then turning the specific door in range back on to trigger the animation but to no avail, I could not get the animation to play at all when I tried that solution. 
 
                 
                door-script.png 
                (154.7 kB) 
               
 
              
               Comment
              
 
               
              Is your door a prefab? When not set it as a prefab; delete all of your objects in your hierarchy and then add your doors again. Hope it fix your issues.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                