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!

2 comments

0

UserInputData. Use that.

0

Messy code. Messy messy messy. I don't understand what you're trying to ask. This question is generally unanswerable.