Preventing Godmode False Positives
Avoid false anticheat bans by replacing SetEntityInvincible with safe alternatives.
Using SetEntityInvincible for features like safezones, spawn protection, passive mode, or revive systems makes the player entity technically invincible. Anticheats cannot distinguish this from a godmode cheat, resulting in false positives.
Best Practice: Disable Friendly Fire
Use NetworkSetFriendlyFireOption instead. This prevents PvP damage without triggering an invincible state, allowing the anticheat to validate damage behavior normally.
Important: The boolean logic is flipped!
When migrating your scripts, remember that the true/false values are exactly the opposite of SetEntityInvincible.
To protect the player (Replaces SetEntityInvincible(true)):
Pass false to turn off friendly fire.
NetworkSetFriendlyFireOption(false)To remove protection (Replaces SetEntityInvincible(false)):
Pass true to turn on friendly fire.
NetworkSetFriendlyFireOption(true)