So, say that I made a hitbox (that follows a player to detect hits from bullets, arrows and whatnot) and attached it to every player that spawned.
If an exploiter deleted their hitbox, would that replicate to the entire server, thus rendering them invincible and unable to die?
I believe the parts deletion will only replicate if the player is the network owner of this ‘hitbox’
What do you mean by network owner?
An exploiter can delete any object that is a descendant of their character including baseparts and server scripts. If an object isn’t parented to their character they won’t be able to delete it and have it replicate to the server. An exploiter is able to teleport unanchored parts (if they are its network owner) into the void though, deleting it.
Yes. This is because they can delete any descendant of their local character and this replicates to the server. Client destruction of character objects replicates to server
However there is one thing to note. Deletion of objects doesn’t fully replicate.
There are 2 ways of deleting Instances, one is hard deletion eg Instance:Destroy() the other is soft deletion eg parenting the object to nil (Instance.Parent = nil)
All deletion of Instances only replicates to the server as a soft deletion, meaning you can parent it back to the character.
Another thing to note is that exploiters can also delete the welds that are connecting parts inside their character, you have to take that in to account as well.
Also exploiters can also delete any character part and character weld inside their character as well (only some of them reset the character, meaning the others can be abused). Furthermore they can stop the respawning of their character to achieve a god mode, they can also achieve a god mode by deleting their Humanoid.
I’ve wrote a small script that fixes a lot of the issues with Robloxes replication. (See the list in the post of the issues fixed) [FE++] Best server sided non physics anti-exploit for your Roblox game!
For your case I’d suggest you would have a script that would parent the Hitbox back to the character when it is destroyed, the same should apply for the weld (Or alternatively instead of parenting the Hitbox back, you could make it kill the humanoid when either is deleted)
The Hitbox should also be welded to the
HumanoidRootPart instead of another character part.
You should also apply the script that I posted above to fix the other issues (or looking at its source code and coding the same functionality yourself.)