whenever my rig reaches my goal -the closest player- its movement becomes really choppy. any fixes?
robloxapp-20250207-2246319.wmv (2.1 MB)
This is probably because of network ownership. I would recommend creating the NPC client side and moving it from the same local script. You can use remote events to trigger the creation and updating of the humanoid.
So would i use :FireAllClients ?
Oh and should the script be one script for all my enemies, using the pathfinding, or multiple local scripts -one for each enemy- ?
Depends how you want to do it. Usually I would recommend using Actors and multi threading, but that might be a little mcuh if you haven’t made one of these systems before. You could have a single Script in ServerScriptService that handles everything, and a LocalScript in StarterPlayerScripts that handles creating and moving the NPCs. When a player joins, tell them the location of all of the NPCs. I would keep a list of all the NPCs on the server, don’t have any actual instances on the server.
yeah I have no clue as to what both actors and multi threading is