I am trying to make humanoids move to a part from a local script, but it doesn’t seem to work.
The humanoids were instanced from a local script.
The script, TroopsFolder is inside of workspace, red/blue is the name of the troop.
I am trying to make humanoids move to a part from a local script, but it doesn’t seem to work.
The humanoids were instanced from a local script.
The script, TroopsFolder is inside of workspace, red/blue is the name of the troop.
Hmm, As long as both the script controlling the NPCs, and the NPCs themselves were instanced on the client it should work.
Make sure that the script is inside somewhere Localscripts can run, such as anywhere in the “Player” object itself, or in your character directly. Localscripts will not run in the Workspace unless its in your character.
It’s also good to note that if the NPCs where instanced locally that the server cannot see them. So a server script would not work in this instance.
To further on this discussion. Humanoids will move for 10 seconds and then timeout. So depending on how far apart they are, they likely won’t make it to their destination. So you’ll need to call Humanoid:MoveTo(pos)
everytime it times out.
I tried controlling the NPCs from the same script that spawns them and from another local script inside the NPC. None of them seems to work or output anything.
Is the NPCs anchored? If so unanchor them.
Ah, yes, they were anchored. Thanks for the help and information.
No worries, had a similar problem, it happens to the best of us