Hello, Developers!
I am trying to make an animation menu and when one of the buttons in the animation menu is clicked the animation plays on the player that clicked the button locally.
The problem is that the animation does not work when clicked, and yes the IDs and scripts should be correct and nothing is displayed on the output.
Here is my script:
--//Hand On Heads Animation
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://6717101238"
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
local wanimation = Player.Character.Humanoid:LoadAnimation(animation)
wanimation:Play()
end)
Thoughts?