Plane bodygyro not working

hello, so im making a plane, the issue is that my body gyro just WONT WORK! My other plane has the exact same setup but doesn’t work.This is my plane script

local runservice = game:GetService("RunService")
local seat:VehicleSeat = script.Parent
local plane = seat.Parent
local turnSpeed = 2
local maxDistanceCheck = 25
local body = plane.Body
local force:BodyVelocity = body.Force 
local gyro:BodyGyro = body.Gyro
local speed = 0
force.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
gyro.MaxTorque = Vector3.new(400000, 400000, 400000)
local function GetNormal(part, normalId)
	return part.CFrame * Vector3.FromNormalId(normalId) - part.Position
end
local function distanceCheck(distance)
    local Bottom = body.CFrame.UpVector
    local Blacklist = RaycastParams.new() 
    Blacklist.FilterType = Enum.RaycastFilterType.Blacklist
    Blacklist.FilterDescendantsInstances = {plane}
local Result = workspace:Raycast(body.CFrame.Position, Bottom * distance, Blacklist)
    if Result then 
        return true
    else
        return false
    end 
end
runservice.Stepped:Connect(function()
    if seat.Throttle == 1 then
        if speed < seat.MaxSpeed then speed += 1 end
        if distanceCheck(25) == true then
            print('true')
            gyro.CFrame = body.CFrame * CFrame.fromEulerAnglesXYZ(0,turnSpeed,0)
        end
      
        local Thing = body.CFrame.LookVector * speed
            force.Velocity =  Thing
         
          
       
    
	end
	if seat.Throttle == 0 then
		speed = math.clamp(speed - 1, 0, seat.MaxSpeed)
		force.Velocity = body.CFrame.LookVector * speed
	end
    if seat.Throttle == -1 then
        if distanceCheck(maxDistanceCheck) == true then
            print("true")
            force.Velocity = body.CFrame.LookVector * -speed
            gyro.CFrame = body.CFrame * CFrame.fromEulerAnglesYXZ(0.1, 0,0)
            else
            
                force.Velocity = body.CFrame.LookVector * -speed
        end
    
    end

    if seat.Steer == 1 then
        gyro.CFrame = body.CFrame * CFrame.fromEulerAnglesXYZ(0,turnSpeed,0)
    end
    if seat.Steer == -1 then
        gyro.CFrame = body.CFrame * CFrame.fromEulerAnglesXYZ(0,-turnSpeed,0)
    end
    if seat.Steer == 0 then
        gyro.CFrame = body.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0)
    end

end)

please help, any help is appreciated!

1 Like

This guy above had the exactly same problem. Plane, BodyVelocity, BodyGyro.

BodyMovers can easily mess each other up if you stack them. So instead, you should just use BodyVelocity and use CFrame.LookVector and completely remove the BodyGyro

Otherwise, if you want a solution where both of them are present, you will have to set the BodyGyro applied force to be higher than BodyVelocity applied force.

how can I make the applied force more?

You can use BodyGyro.P to do that. P means power, and increasing it amplifies power which is basically the force.

Have you tried making all parts of the plane massless? Sometimes the parts are too heavy for the body gyro to withstand.

idk what I did wrong but after I replaced my code with my old plane it worked. This is my old plane’s code



local Speed = 0
local Seat = script.Parent
local Plane = Seat.Parent
local Body = Plane.Body
local Force = Body.Force
local Gyro = Body.Gyro
Gyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
Force.MaxForce = Vector3.new(math.huge, math.huge, math.huge)

local RunService = game:GetService("RunService")
local function GetMass()
	local Mass = 0
	for i, Part in pairs(Plane:GetDescendants()) do
		if Part:IsA("BasePart") then
			Mass += Part:GetMass()
		end
	end

	return Mass
end
while task.wait() do

	if Seat.Throttle == -1 then
		if Speed < Seat.MaxSpeed then Speed += 1 end
		local Thing = Seat.CFrame.LookVector * -Speed
		Force.Velocity = Thing
		Gyro.CFrame = Body.CFrame * CFrame.fromEulerAnglesYXZ(0.1, 0,0)
		
	end
	if Seat.Throttle == 0 then
		Speed = 0
		Force.Velocity = Body.CFrame.LookVector * Speed
	end
	if Seat.Throttle == 1 then
		if Speed < Seat.MaxSpeed then Speed += 1 end
		local Thing = Seat.CFrame.LookVector * Speed
		Force.Velocity = Thing
		Gyro.CFrame = Body.CFrame * CFrame.fromEulerAnglesYXZ(0.1, 0,0)
		
	end
	if Seat.Steer == 1 then
	
		Gyro.CFrame = Body.CFrame * CFrame.fromEulerAnglesYXZ(0, -.5,0)
	end
	if Seat.Steer == -1 then

		Gyro.CFrame = Body.CFrame * CFrame.fromEulerAnglesYXZ(0, .5,0)
	end
	
end