In This Video We'll Be Showing How To Make A Button Play An Animation Only 1 Script Needed.
Script:
local click = script.Parent.MouseButton1Click
local players = game:GetService("Players")
local char = players.LocalPlayer.Character
if not char then
players.LocalPlayer.CharacterAdded:Wait()
end
local hum = char:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://" -- your id
local animationtrack = hum:LoadAnimation(animation)
function playAnimation()
animationtrack:Play()
end
click:Connect(playAnimation)