Difference on the local and client script for playing animations on rigs?

I’ve been trying to play an animation on the local client but it just works for a server script. Here is what I’ve done by now

local hum = script.Parent:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
wait(2.25)
anim:Play()

I would recommend using the client for animating so the animation will always be fluid and won’t lag while trying to catch up the server

Check out the documentation for code samples: