Help getting animations playing for npc who is being moved using local script

I have an npc who walks around but locally as some players aren’t supposed to see them yet, I have the npc walking around locally by cloning it in the script (a tip I saw people recommend on other forum posts, but I still cannot get animations working. I copied the animation script in from the player and tried a both server and local version but nothing seems to be working (the sever likely wouldnt work anyway cause it wouldnt detect movement as its being done by a local script) can anyone help me with this?

Waiter.Humanoid:MoveTo(workspace.WaiterPart1.Position)
		workspace.WaiterPart1.Touched:Wait()
		Waiter.Humanoid:MoveTo(workspace.WaiterPart2.Position)
		workspace.WaiterPart2.Touched:Wait()
		Waiter.Humanoid:MoveTo(workspace.WaiterPart3.Position)
		workspace.WaiterPart3.Touched:Wait()

Can you show all npc’s children

I’ve recently had this problem and the solution is surprisingly simple. It makes use of Roblox’s RunContext.

First, create a Script and change the RunContext to Client this will allow us to be able to run client scripts in other spaces that local scripts could not. In this case, the workspace where our character NPC is.
image

Then, we will simply copy the Animate script to our new script. You can do this by creating a new rig and taking the Animate script from there.
image

After copying the code, we will just take the children of the animate script and place it in our new script.
image

Then, in your NPC model, we will just delete the old Animate script and place down our new one.
image

Hope this helps :slight_smile:

3 Likes

Thanks a bunch! It worked perfectly!