How can I stop the shaking?

I am making a plane and for some reason it keeps shaking.
I don’t know why so here I am asking for help

My question is does it have something to do with when I change where the plane points?

repeat
wait(0)
plane.CFrame = CFrame.lookAt(plane.Position, mouse.Hit.Position)
until plane:FindFirstChild('On').Value == 0

Or Does it have something to do with the velocity?

local attachment = Instance.new('Attachment')
local LinearVelocity = Instance.new('LinearVelocity')
attachment.Parent = plane
LinearVelocity.MaxForce = math.huge
LinearVelocity.Attachment0 = attachment
LinearVelocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
LinearVelocity.VectorVelocity = Vector3.new(0,0,-300)
LinearVelocity.Parent = plane

Thanks!
:smiley:

1 Like

Use task.wait() instead of wait(0) as the wait function has been deprecated.

2 Likes

I would recommend using an AlignOrientation (it’s like a LinearVelocity but for rotation instead of velocity) instead of directly setting the CFrame. You can then update the AlignOrientation’s CFrame how ever often you want (though probably still every Heartbeat/task.wait()). This also makes the movement super smooth, and stops the player from turning their plane instantly/insanely fast.

I don’t believe wait has been deprecated, though task.wait() is the better option for this since it has a shorter delay (minimum wait time for wait is 0.03 seconds, task.wait's minimum is Heartbeat).

Ah, sorry for my mistake. I took this advice somewhere else in devforum :sweat_smile:.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.