Exploiters moving NPCs to void to kill them

I am experiencing an same issue of where exploiters can move npcs into the void and kill them,

and its a shame that setNetworkOwner doesn’t work in serverstorage otherwise i could change the Ownership of the npcs while they’re still stored before parenting them to workspace.

Because can’t a hacker just run a quick repeat loop till it detects the npc being parented to workspace and quickly void them before I can set the network ownership?

So what can I do?

Set the NPC’s parent to the workspace, set the network ownership to the server, then move it to where you want. Or you can just anchor it’s humanoidrootpart.

1 Like

Thank you, does anchoring the humanoidrootpart on server prevent hackers from voiding it by moving the NPC’s position to -99999 y axis to void?

unless they’re close enough they won’t get network owner so just spawn it far away from any player then bring it back after setting network owner to server

Anchored parts don’t simulate physics, so exploiters can only move it on their client. All parts welded to anchored parts are ‘Grounded’, which makes them physically anchored as well. That means the head and other limbs are ‘anchored’ even tho they aren’t.

When you parent the NPC to the workspace, you still have enough time to do other operations before it is replicated to the clients, so you can set the network owner safely in the workspace for a few milliseconds.

        while Farm do task.wait()
            pcall(function()
                tp(getMob().HumanoidRootPart.CFrame * CFrame.new(0,20,0))
                plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, getMob().HumanoidRootPart.Position)
                if getMob().Humanoid.Health < getMob().Humanoid.MaxHealth then
                    getMob().Humanoid.Health = 0
                end
                if getMob() == nil then
                    tp(CFrame.new(8760, 581, -738))
                end
            end)
        end
    end)

the issue might be that the hacker uses task.wait() to loop very fast, how do i counter this so they dont get the npc before i set the npc ownership to nil?

The npc’s network owner will probably be set to nil before the exploiter can do anything. If that isn’t the case, just change the position to be very far away, set the network owner, then move it. However, I don’t recommend this since I don’t think it’s practical for an exploiter to move a part before it’s network ownership is set if that’s the first thing you do after that part’s been parented to the workspace.