Alright, so I built an airplane and it's supposed to turn on the Z-Axis with bodygyro, then on the X/Y-Axis it rotates with BodyGyro, but separately. In solo mode, it works fine. But in online, it moves around only on the Z-Axis. So basically all it does is roll. If it helps: Code for activating the scripts:

wait(1)
tool = script.Parent
typex = script.Parent:FindFirstChild("type")
local plr = game.Players.LocalPlayer
xx = script.Parent.X
yy = script.Parent.Y
local mou = plr:GetMouse()
fliers = {}
tabnum = 0
on = false
heliStor = script.Parent.fly:FindFirstChild("helinum")
heliType = script.Parent:FindFirstChild("type")
for i,v in ipairs (workspace:GetChildren()) do
	if v.Name == heliType.Value then
		if v.pilot.Script.heli.Value == heliStor.Value then
			engin = v.engine
		end
	end
end
bv = engin.BodyVelocity
ful = engin.fuel
on = script.Parent.onn
while true do
	wait()
	if on.Value == true and ful.Value > 0 and bv.speed.Value > 100 then
		script.move.Disabled = false
		script.move2.Disabled = false
		engin.BodyGyro.MaxTorque = Vector3.new(0, 0, 400000)
		engin.bg.MaxTorque = Vector3.new(400000, 400000, 0)
	else		
		script.move.Disabled = true
		script.move2.Disabled = true
		engin.BodyGyro.MaxTorque = Vector3.new(0,0,0)
		engin.bg.MaxTorque = Vector3.new(0, 0, 0)
	end
end

Code for left/right/up/down motions:

tool = script.Parent.Parent
typex = script.Parent.Parent:WaitForChild("type")
local plr = game.Players.LocalPlayer
xx = script.Parent.Parent.X
yy = script.Parent.Parent.Y
poi = script.Parent.Parent.point
local mou = plr:GetMouse()
fliers = {}
tabnum = 0
on = false
heliStor = script.Parent.Parent.fly:FindFirstChild("helinum")
heliType = script.Parent.Parent:FindFirstChild("type")
for i,v in ipairs (workspace:GetChildren()) do
	if v.Name == heliType.Value then
		if v.pilot.Script.heli.Value == heliStor.Value then
			engin = v.engine
		end
	end
end
bv = engin.BodyVelocity
bg = engin.bg
bg1 = engin.BodyGyro
while true do
		wait(0.05)
		bg.cframe = poi.Value
end

Code for rolling:

tool = script.Parent.Parent
typex = script.Parent.Parent:WaitForChild("type")
local plr = game.Players.LocalPlayer
xx = script.Parent.Parent.X
yy = script.Parent.Parent.Y
poi = script.Parent.Parent.point
local mou = plr:GetMouse()
fliers = {}
tabnum = 0
on = false
heliStor = script.Parent.Parent.fly:FindFirstChild("helinum")
heliType = script.Parent.Parent:FindFirstChild("type")
for i,v in ipairs (workspace:GetChildren()) do
	if v.Name == heliType.Value then
		if v.pilot.Script.heli.Value == heliStor.Value then
			engin = v.engine
		end
	end
end
bv = engin.BodyVelocity
bg = engin.bg
bg1 = engin.BodyGyro
while true do
		wait(0.05)
		bg1.cframe = CFrame.fromEulerAnglesXYZ(0,0,xx.Value)
end

I thought separating it, might fix the problem, but it didnt. Also, it only seems to work when I launch one of the rockets, the one that changes where the plane is facing, I mean. Any ideas?

4 comments

0

Perhaps try WaitForChild()? It worked for me multiple times if soemthing didn't work in online mode.

0

Nah it just produces an error and stops. But I might try repeat until()

0

didnt work

0

I'm having BodyVelocity and BodyGyro trouble too :/