I want to make a door animation for a train, and it will be activated with a GUI button. For some people, the animation executes, but for others, it doesn't. Here's the script:
local button = script.Parent local db = false button.MouseButton1Click:Connect(function() print("bing") local train = workspace[tostring(game.Players.LocalPlayer) .."Train"] --the train local door = train.DoorL local doorsclosing = door.AnimPart.DoorsClosing --the sound local anim = door.OpenClose --the animation local controller = door.AnimationController local track = controller:LoadAnimation(anim) if db == false then db = true print("anim playing") track:Play() wait(3.05) track:AdjustSpeed(0) wait(10) track:Play() doorsclosing.TimePosition = 2.485 doorsclosing.Playing = true wait(6.95) db = false end end)
The animation is group owned, and the game is group owned.
Any help will be appreciated!