How do I script a tank seat that can rotate a gun and aim up and down?

Thank you! I’ll try this out in a bit. I already have a missile system in place for my planes.

Unfortunately, it doesn’t seem to rotate at all.

Did you change anything? And if so what? I dropped it into an empty world and it works fine for me:

https://gyazo.com/c52bcdec6e1de7263e328579a7deb98c

I did not change anything. What controls are used to move it?

A / D for horizontal rotation and W / S or Arrow Key Up / Arrow Key Down for vertical.

Strange, I tried that and it didn’t work.

Maybe it’s because I tried it in studio and not in the client.

I tried using R6 and R15 in both Studio and a running game server. Do you see anything in the output? A message should be printed when you first sit.

Also, in Studio, change the window to Server and change the BaseRotation’s AngularVelocity property to 6 or some other number and see if anything moves. If not, you may have anchored something by mistake.

https://gyazo.com/4ed3cdc57e62dfe73a67c28c295a5d09

It turns out that the model was anchored when I first inserted it. After I unanchored it, it worked.

1 Like