Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Gear doesn't animate when I press the Hotkey G? [Solved]

Asked by 6 years ago
Edited 6 years ago

So I edited Vitaru's Airbus A320, and tried to animate the gear. But it somehow doesn't work. Can someone tell me why?

function changeGear()
    gear = (not gear)
    for _,v in pairs(gearParts) do
        v.Transparency,v.Reflectance,v.CanCollide = (gear and v.Trans.Value or 1),(gear and v.Ref.Value or 0),(gear and v.Collide.Value or false)   -- Learning how to code like this is extremely useful
    --setup gear animations here

    if script.Parent.Parent.Parent.Parent.OtherParts.Interior.Animations.FG:WaitForChild("Motor").DesiredAngle == 1.7 then
        script.Parent.Parent.Parent.Parent.OtherParts.Interior.Animations.FG:WaitForChild("Motor").DesiredAngle = 0
    else 
        script.Parent.Parent.Parent.Parent.OtherParts.Interior.Animations.FG:WaitForChild("Motor").DesiredAngle = 1.7


    end 



    end
end

Thanks!

0
UserInputData. Use that. TheLightningRises 56 — 6y
0
Messy code. Messy messy messy. I don't understand what you're trying to ask. This question is generally unanswerable. OldPalHappy 1477 — 6y

Answer this question