Im trying to make a spaceship everything works good besides the fact that the speed slows down if i push the nose of my spaceship up or down. I Think it has to do with the formula im using to determine the velocity of the bodyvelocity, this is the script:
local Ship = script.Parent local primary = Ship:WaitForChild("Primary") local seat = Ship:WaitForChild("VehicleSeat") local BV = primary:WaitForChild("BodyVelocity") local Speed = Ship:WaitForChild("CurrentSpeed") local LookPart = Ship:WaitForChild("LookPart") local Hoover = Ship:WaitForChild("Hoover") Hoover.Value = true local BP = primary:WaitForChild("BodyPosition") while wait() do BV.Velocity = LookPart.CFrame.lookVector * Speed.Value if Hoover.Value == false and Speed.Value >= 1 then BP.Position = seat.Position end end
Don't want to crush your dreams here but, try a different approach, using body position to move a ship is horrible, make a local script to control your character, because the Vehicle is attached to the player and thus the client can control the vehicle at 60 frames per second.