So I made a surface gui, then a scrolling frame, then a text button. I put a animation into the button then put in the animation Id. I inserted a script into the button.
local animation = script.Parent.Animation1
script.Parent.MouseButton1Click:Connect(function()
animation:Play
end
I later figured out what's wrong with it. I'm not actually running it off a player. I have no clue how to do that though. I assume it would be something like, local Player = game.Players.LocalPlayer
But if I do that I have no clue how to run the animation off the player. Any help with this would be amazing. Thanks!

1 comment
I tried this. and it didn't work. local animation = script.Parent.Animation local player = game:GetService("Players").LocalPlayer local character = player.Character local humanoid = character:FindFirstChild("Humanoid") script.Parent.MouseButton1Click:Connect(function() if humanoid then humanoid:LoadAnimation(animation) animation:Play() end end)