NPC characters controlled by local scripts wont move with by MoveTo when player character is far away or when CharacterAutoLoad is set to false

NPCs wont move on local script while the character autoload is set to false. That means the following code will work on local script only when CharacterAutoLoad is set to true and will not work when CharacterAutoLoad is set to false.

wait(5)
print("Start")
workspace.Folder.Rig.Humanoid:MoveTo(Vector3.new(100,0,0))
workspace.Folder.Rig.Humanoid.MoveToFinished:Wait()
print("End")

It happens all the time.
No beta feature enabled.

Tested in studio play solo

Expected behavior

I expect the player to be able to see the npc moves.

here is the file
TopDown.rbxl (77.6 KB)

(Set CharacterAutoLoad to false to see the bug or if its on move away from the character)

I am able to reproduce this - as a workaround could you implement a spawning system which is what I do for my current game?

Ok for some reason when i put the npc inside Replicated storage and clone it to workspace it works.

1 Like

This is because of network ownership. When the player isn’t close to the NPCs, they are not assigned network ownership and hence can not apply any physics updates to the models.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.