Why calling destroy on instances that is a descendant of player character with client is replicated?

So when i call destroy on a desecendant of LocalPlayer.Character it replicates to server, how and why would it replicate to server?

The client has network ownership of their character. Any changes made will be replicated

but doesnt network ownership only replicates CFrame and positions?

Yes, but for some reason everything (or mostly everything) in the character replicates

damn… can instances inside player instance get deleted aswell?

Yes, and server scripts and such

thanks, now i realized my game sercurity does nothing

Yes, but this is why you listen for the ‘ChildRemoved’ event/signal to fire on the player’s character on the server.

local Game = game
local Players = Game:GetService("Players")

local function OnPlayerAdded(Player)
	local function OnCharacterAdded(Character)
		local function OnChildRemoved(Child)
			if Child.Name == "Health" and Child:IsA("Script") then Player:Kick() end --Player attempts to delete the default 'Health' script.


1 Like