Tried a different method, but failed

Hey!
I tried a method that was different from the one sir used. I basically removed one of the three variables and tried to make the code shorter. But, the code keeps failing and the OpenDoor function isn’t updating. Please help me out as I don’t see anything wrong in this code

First, i would strongly recommend keeping the CurrentYaw variable. Reason being is that once you open the door, if you ever plan on closing it, you need InitalYaw to stay the same so you have the door’s InitialYaw to lerp() back to.

And second, closing the door aside, I can’t see anything wrong with your code as it stands; however, it would help if I could see the message log after a failed compile, as that will usually tell you where you went wrong.

Privacy & Terms