What's the best way to rotate a turret-barrel while moving?

what’s the best way to rotate a turret-barrel while moving?

when you click on a gui textButton the turret-barrel should go up no matter what axis you are in. like when the turret tips over on its side.

how would i code this.

2 Likes

What you want is a Motor between the turret base and the turret head. Once the motor is attached properly, you set the desired angle and the motor would attempt to achieve it. Here is the wiki page for motors:

You would simply add or subtract to this desired angle when the button is pressed.

For how to setup a motor, you may want to look at the Building Support subcategory. Using the search, you should be able to find a question on it. They also have a tutorial about setting up a motor on the developer wiki here:

9 Likes

Thanks :slightly_smiling_face: