#My plane landing gears are not closing
57 messages · Page 1 of 1 (latest)
@violet grotto Can you send Videos/Scripts that are relevant?
ill send the script
local Event = script.Parent.Parent.Parent.Events.Gear
Event.OnServerEvent:Connect(function()
if script.Parent.p.Motor.DesiredAngle == 0 then
script.Parent.p.Motor.DesiredAngle = -1.7
wait(0.5)
for _,g in pairs(script.Parent.Cover:GetDescendants()) do
if g.Name == "Gear" then
for _,t in pairs(g.Model:GetChildren()) do
if t:IsA("MeshPart") or t:IsA("Part") or t:IsA("UnionOperation") then
t.Transparency = 1
t.CanCollide = false
end
end
end
end
else
wait(1)
for _,g in pairs(script.Parent.Cover:GetDescendants()) do
if g.Name == "Gear" then
for _,t in pairs(g.Model:GetChildren()) do
if t:IsA("MeshPart") or t:IsA("Part") or t:IsA("UnionOperation") then
t.Transparency = 0
t.CanCollide = true
end
end
end
end
script.Parent.p.Motor.DesiredAngle = 0
end
end)
what is a codeblock
ohh
local Event = script.Parent.Parent.Parent.Events.Gear
Event.OnServerEvent:Connect(function()
if script.Parent.p.Motor.DesiredAngle == 0 then
script.Parent.p.Motor.DesiredAngle = -1.7
wait(0.5)
for _,g in pairs(script.Parent.Cover:GetDescendants()) do
if g.Name == "Gear" then
for _,t in pairs(g.Model:GetChildren()) do
if t:IsA("MeshPart") or t:IsA("Part") or t:IsA("UnionOperation") then
t.Transparency = 1
t.CanCollide = false
end
end
end
end
else
wait(1)
for _,g in pairs(script.Parent.Cover:GetDescendants()) do
if g.Name == "Gear" then
for _,t in pairs(g.Model:GetChildren()) do
if t:IsA("MeshPart") or t:IsA("Part") or t:IsA("UnionOperation") then
t.Transparency = 0
t.CanCollide = true
end
end
end
end
script.Parent.p.Motor.DesiredAngle = 0
end
end)
you need to press enter after typing lua
just edit your message
shift + enter
there ya go
i used same script with front landing gear
front is working but back ones not working
What should it be doing normally?
Like what should happen when u close the gear? Like should it have an animation, like what should the script be doing
oh
when i press G
the landing gears must go inside
the body
and go transparent
Go inside with an animation?
Where do you play the animation
I just see you waiting a certain amount of time and then making all parts transparent/opaque in this script
i didnt add any animation
** You are now Level 4! **
Well theres your issue then no?
with motor
It doesnt apply any animation cause you didnt add any
how do i
although does the motor.desiredangle normally do the rotation?
Maybe the back wheels dont have the motors correctly setup then?