Basically, I made a ScrollingFrame and put a bunch of TextButtons in, and the idea was when you click a certain text button, your character would do an animation. I tried a few things but none of them worked, though one of them DID work, but only in studio, and when I team tested in studio with my friend, he couldn't see the character playing animations.
I'm not sure what's wrong with the script, though I did it in a LocalScript and then pasted the script in all the TextButtons.
local animation = Instance.new("Animation") animation.AnimationId = "rbxassetid://8836599773" 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("Animation Played") end) trackanimation:Play() end end script.Parent.MouseButton1Click:Connect(playAnimation)
Any help is appreciated, I can elaborate below.