Keeping Part Stationary [LERPING] [EDITED]

Hello, I have an issue. I want to rotate only turret part, and leave the basepart still.

My Code:

What it does:
https://gyazo.com/2decebbd4cd5aba6340920efaac02965

Everything is welded using WeldConstraints, with the “Turret” model parts all welded to the TurretRing.
The TurretRing itself is welded to the basepart.

Edit:
Edited the code so now it faces the correct way. I still havent figured out how to have the big grey part not move, and be stationary. As soon as I anchor it, it doesnt move, but I need it to be unanchored since it’s going to be put on a moving tank hull.

I haven’t really used lerping a lot but you could try using TweenService. I use it to animate movements of objects such as a turret.

The problem you’re having with the lerp is that you’re taking X Y and Z into the destination. You should only include X and Y to move the entire turret left and right and then Z for maybe the gun inside to turret.

1 Like

@Korvbagarens I can’t use tweenservice, because the model needs to be unanchored to move. The turret is going to be attached to a tank hull.

I created a working Humvee turret with tweenservice. I didn’t build the model but i created the scripts for it and it worked. I don’t remember how we got over the anchoring problem though.

1 Like