Hello Developers, I’m trying to get my plane to slowly look at the mouse without it turning so quickly
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
game.ReplicatedStorage.GetMouse.OnClientEvent:Connect(function()
game:GetService("RunService").RenderStepped:Connect(function()
game.Workspace.Model:SetPrimaryPartCFrame(CFrame.lookAt(workspace.Model.VehicleSeat.Position, mouse.hit.Position))
end)
end)
I’m not sure how to exactly do it and can use some help.
If you have any questions, please ask.
One way to make the plane look at the mouse smoothly is to use a BodyGyro object. You can set the CFrame property of the BodyGyro object to a new CFrame created using the CFrame.lookAt() method, which takes in the position of the plane and the position of the mouse hit as arguments (Issues with BodyGyro following mouse).
You can also try adjusting the P and D properties of the BodyGyro object to control how aggressively and smoothly the plane rotates towards the mouse (Rotating Character towards mouse but not choppy)