-- no stel pls -- Made by MrNotSoBaddy local Animation = Instance.new("ScreenGui") local TextButton = Instance.new("TextButton") Properties: Animation.Name = "Animation" Animation.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
TextButton.Parent = Animation TextButton.BackgroundColor3 = Color3.new(1, 1, 1) TextButton.Position = UDim2.new(0, 27, 0, 331) TextButton.Size = UDim2.new(0, 120, 0, 30) TextButton.Font = Enum.Font.SourceSans TextButton.Text = "Animation" TextButton.TextSize = 14 -- Scripts: function SCRIPT_WOBO83_FAKESCRIPT() -- TextButton.LocalScript getfenv().script = Instance.new('LocalScript', TextButton) local animation = Instance.new("Animation", x) -- x can be the object that you are adding the animation to or even in the workspace animation.AnimationId = "http://www.roblox.com/Assest?ID=2561376219"
local trackanimation = nil
local playability = true
function playAnimation(AnimationSource)
if playability == true then
local plr = game.Players.LocalPlayer
trackanimation = plr.Character.Humanoid:LoadAnimation(animation)
trackanimation.KeyframeReached:connect(function()
print('Working')
end)
trackanimation:Play()
end
end script.Parent.MouseButton1Click:connect(playAnimation)

2 comments
put all in code box, and talk error.
also you don't need to name the animation, just the variable