How to create NPCs locally?

Greetings,

I am trying to create an NPC that can move around and animate on the client. On the server i just insert a serverside Animate and Health script and they work fine. However I am not having any luck on the client.
I put inside a local Animate script and a local Health script, but they aren’t animating. I tried all the variations between these 4 scripts but no luck. They respond to WalkToPoint but they don’t animate while they move.
Any advice would be appreciated.

Thank you for your time

1 Like

Can you show us the scripts? And is it a LocalScript you’re using to load the animation on the NPC’s or a ServerScript?

I just copied the local Animate script from my char while testplaying and put it into the NPCs, the health script i guess isn’t really relevant but i also made it a local script and pasted it into the NPCs, i tried the same with making them into serverside scripts but no go. The key part is that this is all on the client the npcs don’t exist on the server, not sure if that is the issue, but i really am hoping it can be done clientside

Are you copying them with a LocalScript?

actually i just used the explorer to move the npc modles from the RS to workspace while in play. This is because hwen i did it via script this is needed for they would appear but wouldn’t animate so i tried to find a solution without going through the script each time i try a different solution

Have you tried using custom animations?

No I have not. These NPCs would just stand there and wave when you get close, so didn’t really need to. All i need from them is to play idle animations just like the player and to wave twice, thats all. You think that would help?

Is it possible for you to change the animation priority to be Action within the script?

I am not sure. My problem is that there is 0 animation at all. they just stand there like a rig.

Well I think the animation is there, it just needs to have animation priority, because I think something is overriding it.

well this is the exact same script that is inside the player character. So i am not sure why there would be an issue. I also use this same script jsut inside a serverscript inside the serverside NPCs and they animate fine. This is why i am so perplexed by this

You could assign the random movement with a seed then render them on the client with that seed