Animating Plane Engine

What is the issue?

Script

This happens:
https://gyazo.com/9b431c94a4d30a377e491806cade016a

What solutions have you tried so far?

  • I have changed CurrentAngle on motor, in script. I also tried to caught some spelling problems, but I don’t think there was. I don’t know what to do

Please tell me if you know anything or what mistake did I do.

1 Like

Use a loop maybe? It seems that your code only runs once and doesn’t continue after the instructions have been followed when the buttons is pressed.

Yeah that is what I did. I used for loops.

You did a loop but the loop stops at one point which makes the engine stop.

can you tell me where it stops, and how can I fix it?

Using a hinge wouldn’t be my approach to making a engine rotate in the first place. I would simply use a angular velocity to make the engine rotate at a constant speed. This way whenever you click the off or on button you can simply change the angular velocity to Vector3.new(0, 0, 0) which is off or Vector3.new(0, 0, 15) which is on.

For the loop found on line 7, the code inside the loop would run 50 times, then end. You can fix it by making it a while loop. I suggest replacing it with while script.Parent.Parent.EngineOn.Visible == false do