Hello! How to make a moving NPC through waypoints animated (like walking, swimming, and etc)?
Easiest way to do it is to playtest the game, check your character, copy the Animate script content, then add a script to your character called Animate and paste the content there.
Thank you for your reply! So, I already did that, but it seems that the NPC is still not performing walking animation or any such.
Here’s my NPC’s content and structure.
You also have to copy all the children under the Animate script and paste it into your character’s, sorry for not mentioning that, if it doesn’t work then I’m not sure what could be wrong.
And the script has to be a server script, not a local script
I had to run it on a serverscript, thanks. But why?
It has to be run on the server because there is no client to access. If you want me to explain more I’m happy to.
Yes, please. I want to know why, if possible.
Do you understand the difference between server and local scripts, or should I start from there?
Yes, I do understand the difference between server and local scripts.
Basically, you cant use a local script to animate things like NPCs because Roblox wont replicate the animation to the other clients. This is because animations are only replicated if the client has network-ownership of the animator, which is only the case for the animator of the player’s own character. Since the client doesn’t have network-ownership of a NPC’s animator, when you try to play an animation from the client, it will not work. Hope this helps!