so i want it to play an animation when i click a gui. im getting no errors but its not playing.
player= game.Players.LocalPlayer animation = script:WaitForChild("Animation") enabled = true game.StarterGui.BodyRoll.BodyRollText.MouseButton1Click:connect(function() if enabled then enabled = false animationtrack = player.Character.Humanoid:LoadAnimation(animation) animationtrack:Play() wait(1) end end)
I think you made a typo.
player = game.Players.LocalPlayer animation = script:WaitForChild("Animation") enabled = true game.StarterGui.BodyRoll.BodyRollText.MouseButton1Click:connect(function() if enabled then enabled = false animationtrack = player.Character.Humanoid:LoadAnimation(animation) animationtrack:Play() wait(1) end end)