I have tried making an npc animation The script goes like this, wait
wait(3)
local hum = script.Parent.Humanoid
local anim = hum:LoadAnimation(script.Parent.Animation)
anim:Play()
Can anyone fix this for me?
I have tried making an npc animation The script goes like this, wait
wait(3)
local hum = script.Parent.Humanoid
local anim = hum:LoadAnimation(script.Parent.Animation)
anim:Play()
Can anyone fix this for me?
I think this is a question about scripting rather than animation.
I'm not sure but do you need the script to wait for "hum" to exist and go from there?
local hum = script:FindFirstAncestorOfClass("Humanoid")
local anim = hum:LoadAnimation(script.Parent.Animation)
anim:Play()
Thanks but its not working do i have to put the animation into the script or out?
local hum = script.Parent:FindFirstChild("Humanoid")
local anim = hum:LoadAnimation(ANIMATIONPLACE) --Put in ANIMATIONPLACE the place of the Animation
anim:Play()
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Are you using a local script?
No