A client can kill a npc and it will replicate to the server

I have an NPC and I tested Humanoid:TakeDamage in the command bar. For some strange reason when the NPC dies on the clients side it replicates to the server. I don’t even know what could be causing this as I don’t have any remote events that do damage through the server.

I have even tested it on an empty server with no scripts and still shows the same results.


Most things like health are managed on the client meaning any changes there occur on the server

1 Like

That shouldn’t be the case. The server would not be able to see the damage that the client gives it.



1 Like

No like i said the data for your player is managed on the client, health is one of them, there isnt a very easy way of doing this apart from having a numbervalue called health in the character and a script to set the health to the number on the server then changing that value instead

1 Like

I highly recommend you use:


1 Like

Even with a remote event an exploiter can just execute a :TakeDamage script


Oh, wait, my bad. I think I read that wrong.

1 Like

like i said make your own server value like this:

local runService = game:GetService("RunService")

script.Parent.Humanoid.Health = script.Parent.Health.Value
1 Like

I think you should try setting the network owner of the NPC to nil so it can’t be changed by the client.

1 Like

It mite b due to network ownership. Try changing it to nil.

1 Like

Health does not replicate from the client to the server, as doing so would create issues, such as exploiters being able to set their health insanely high.

Screen Shot 2021-08-09 at 8.16.07 AM

Screen Shot 2021-08-09 at 8.15.57 AM

Why not just have the server take care of the health entirely?
The client cannot tamper with their own health through exploits, it would just look like healthbar gucci.

That’s exactly what’s happening, actually

How about you constantly change the humanoids health at the first priority so even if the exploiter does change the health it will go right back

That’s not really necessary, as the second the server changes the client’s health, the client will replicate that

I can confirm this behaviour.
My NPCs have :TakeDamage() dealt by the server not the client.

If the client changes the NPC Health to 0, it will not die.
However, if the NPC is then damaged on the server, it dies on the client and server.
This happens even if the NPC still has >0 health on the server.

Arc_Cosine’s suggestion fixed this behaviour.