Hey guys, I'm trying to get my NPC/Models to play animation (automatically) but it doesn't work and I got this error: 14:00:46.507 - Play is not a valid member of Animation 14:00:46.509 - Stack Begin 14:00:46.511 - Script 'Workspace.Worker.Script', Line 4 14:00:46.512 - Stack End
So mainly it's; 14:00:46.507 - Play is not a valid member of Animation
But I don't know what's wrong, I added a script inside the Worker (NPC) so the script's parent is Worker, then I added a new animation into Worker so it's parent is also Worker, now this is the code in the script;
local animation = script.Parent:WaitForChild("Animation")
while wait() do
wait(0.1)
animation:Play()
wait(0.1)
end
As I said, I'm trying to play the animation so it will just keep playing and playing, but it won't,
What's wrong? Should I move something? Do I need a different script?
And lastly, can you help me rewrite the script while explaining or tell me what I did wrong so I can fix it.
Thank you if you really tried to help.
