Hi! I kinda finished this plane I made that you can change the direction via mouse and press the W key to move forward. But… it doesn’t move smoothly. This is the game: (1) Untitled Game - Roblox
Everytime you fly the plane, it has to glitch out. Is there a way I can fix this?
Code to make the plane look in the direction of the mouse:
local plane = workspace.Model.PlaneWalls.PlaneBody local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() local mouseActive = game.StarterPlayer.StarterPlayerScripts.FollowMouse.Disabled == true local seat = workspace.Model.VehicleSeat seat.ChildAdded:connect(function() local Sit = player.Character.Humanoid.Sit if Sit == true then print("The player just sat down.") mouse.Move:connect(function() if mouseActive == false then local mousePosition = mouse.Hit.p plane.CFrame = CFrame.new(plane.CFrame.p,mousePosition) end end) else print("The player is no longer seated.") end end)