I tried with a local script and a usual script none of them work
The code:
local Humanoid = script.Parent:WaitForChild("Humanoid")
local animation script.Parent.WalkAnim:WaitForChild(animation)
local anim = Humanoid:LoadAnimation(animation)
wait(3)
anim:Play()
Well, in your script you have local animation (animationPath)
, without you setting an equal sign to that variable, it makes the value of the variable nil. So.. humanoid:LoadAnimation(animation)
is basically humanoid:LoadAnimation(nil)
. That's why is says you're missing an argument. To simply fix this, just do local animation = animationPath)