Please tell me, do players have the ability to kill my NPC or teleport him to an arbitrary location on the map?
I have already logged into the server several times, either I did not find my NPC on the map, or I found it in strange places, for example, on the roof of a high-rise building.The NPC is controlled by a server script. And walks on the dots. Either it’s some weird glitches or the players are just messing with me.
Is it really such a difficult question? Maybe I’m not aware of any security measures, maybe I need to disable the console in the game? I’m just ignorant about cheating.
It’s possible it could be affected by physics (and thus a cheater could push/fling it), but if your game isn’t very big and you’re seeing it often, it’s more likely to be an issue with your code or a part of your game acting wrong. Can you give more details about the NPC, show where it ends up, etc?
I’ve already fixed my code many times. Now my NPC is reborn after death, respawns if it can’t reach the checkpoint, but today it got stuck again because I missed one possible mistake.
My question right now is not about the NPC code, but about the capabilities of the cheaters, whether they can access some commands and kill or move NPCs, and if they can, how to block this opportunity once and for all.
If they get network ownership of the NPC, they can move him around anywhere.
I have at the beginning of the code
NPC…PrimaryPart: SetNetworkOwner(nil)