cant get door to open when i press 'E' (javascript) (stuck on youtube tutorial)

ok so ive seen around 4 videos all on the same thing, how to open a door, with javascript and an animation and a trigger (this is the one i ended up going with

) and i downloaded the same code he used but i cant for the life of me figure out where i went wrong, i get the GUI saying “press E to open” but when i do it, nothing happenes, i even made and open and close animation, ive had to watch this video a few times, which sucked because it was half an hour long, and i still cant firgure out where i went wrong (ive included both photos of what colliders and animations ive got and the javascript)

Haiii, Add another collider to your door, make it a trigger & size it the area that you want the player to open the door, That should work by looking at your code then the gameobject, Enjoy the rest of your night/day C:.

Edit Just read that you get the Press e to appear the youtube video was covering some of the thread, Add a debug.log to changedoorstate & see if that shows up if it does it’s got something to do with the animations, your script looks fine otherwise*

  • Jabez

thanks :slight_smile: