I dont know why Its prob something Im not seeing can any1 help?

local player = game:GetService("Players").LocalPlayer
	 
repeat
    wait()
until player.Character
 
local char = player.Character
local hum = char:WaitForChild("Humanoid")
 
local animation = hum:LoadAnimation(4898878621)
 
script.Parent.MouseButton1Click:Connect(function()
    animation:Play()
end)

4 comments

0

The animation is a IntValue, You will need a string (Line 10). Try putting "rbxassetid://4898878621" instead

0

Same issue. its telling me in console before I even click it

0

Don't you have to create an animation to play?

0

local animTrack = Instance.new("Animation") animTrack.AnimationId ="rbxassetid://4898878621" local animation = hum:LoadAnimation(animation)