How would I rotate a model Smoothly? (UPDATE: How can I not use the Y orientation of CFrame.LookAt)

Why don’t you use CFrame:Lerp()? You can set a starting cframe and an ending one, then use the function inside a for loop like this

local startingCf = CFrame.new(0, 0, 0)
local endingCf = CFrame.new(1, 0, 0)
for i = 1, 100, 1 do
    model:PivotTo(startingCf:Lerp(endingCf, i/100))
    task.wait()
end

tweenservice is better to be honest

ok so i cant find a script that could help u on this issue, but you need to find somebody that can help u

I don’t think you can move models with tweenService

wait… fr? i didn’t know abt that xdd

can you elaborate maybe?
this is for chars

I got something figured out. Can someone tell me how I could do CFrame.LookAt but not use the Y orientation?

2 Likes

turret:GetPivot() * CFrame.lookAt(Vector3.new(turret:GetPivot()), mouse.Hit.Position)
Did you try to multiply by the turrets cframe cuz else it will teleport to cframe(0, 0, 0). You tested this already right?

1 Like

Didnt read ur text good sorry turret:PivotTo(CFrame.new(cframevalue.value.x, turret:getpivot(), cframevalue.value.z)
I didnt test this btw.

1 Like

that wanst made by me bruhhhhh

yes you Can, btw let me hop in studio and euhh do something with your file

your weld script is broken and where is your gunnerseat?

I LOVE CHAR LIMIT

Try tweening atan2 with the Mouse Axis if you want smòoth rotation. You can also use a plugin to weld the car if not done already. Atan2 = four-quadrant inverse tangent. I suggest you read a bit about atan2 it is pretty useful. For example you have a frisbee and you throw that firsbee to your friend on the other side of the field, atan2 would tell you where the firsbee would be by its end destination.