Hey guys! why is my bike moving slanted not straight?
local timeForSpeedUpAndSlowDown = .5 --Seconds
local seat = script.Parent
local body = script.Parent.Parent.Part
local LinearVelocity = Instance.new("LinearVelocity", body)
local attachment = Instance.new("Attachment", body)
LinearVelocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
LinearVelocity.Attachment0 = attachment
local Gyro = Instance.new("BodyGyro", body)
Gyro.CFrame = body.CFrame
Gyro.MaxTorque = Vector3.new(1,1,1) * 100000
while wait() do
LinearVelocity.VectorVelocity = body.CFrame.RightVector.Unit * (seat.Throttle * 100)
LinearVelocity.MaxForce = (body.AssemblyMass * LinearVelocity.VectorVelocity.Magnitude) / timeForSpeedUpAndSlowDown
end