Go test it yourself then. Changing the network owner prevents client from dealing damage to the humanoid.
I know fully well what I’m talking about. Network ownership only relates to physics and parts, not humanoids. Either you have a faulty implementation or you’ve encountered a bug. A client having network ownership of an NPC’s parts doesn’t mean it can be authoritative of humanoid changes.
I understand that and I mentioned above that it’s probably a bug from roblox and that I would be reporting it. But as of now network ownership does control the humanoids properties of non-player characters even if it is not meant too.
Do you have a working repro you can show of this behaviour? I am certain in my assertion that this is false. Again, network ownership has nothing to do with replication beyond physics. This also goes with a player’s own humanoid and how they are unable to manipulate something such as health without an insecure server as a medium.
In fact, for example, local WalkSpeed changes don’t replicate either. Why a player moves faster when changing their WalkSpeed is because of the velocity (physics) that they replicate over.
I’ll create a repro to show you right now…
Edit:
@colbert2677
Actually it’s easier to just follow these steps. Create a new place and put down two dummies and call one of them “dummyOne” and the other “dummyTwo”. Put a script in dummyTwo with this line of code
script.Parent:WaitForChild("HumanoidRootPart"):SetNetworkOwner(nil)
Next kill dummyOne on the client then check server and you’ll see that he is also dead on the server.
Now kill dummyTwo on the client then check server and you’ll see he’s still alive.
Make sure you are near the npc’s.
I’m unable to test that right now. If you’re able to receive a response in around 2 hours or someone else can test that with a video/GIF provided, then it can be further discussed from there.
I’ll record it for you right now.
…huh, that’s interesting. TIL. This now spawns a wave of concerns for me and I’m going to do a bit of testing and investigation when I’m available.
My assertion has been disproven. Thanks for sharing the repro video.
No problem, I’ll write a report on it later.
I believe that the problem isn’t related to Humanoid.Health
specifically, if on the client you do Humanoid:TakeDamage()
and it does not kill the npc then the server will not replicate the health difference. It is only when the npc dies on the client that the server replicates 0 health.
What I have found is that deleting the ‘Neck’ Motor6D locating in the Head of R15 rigs or in the Torso of R6 rigs causes the npc to die & replicate. Having the health reach 0 or calling npc:BreakJoints() causes the ‘Neck’ to be destroyed and replicate.
You are a genius! The issue was dealing with network ownership but it was because the joints break not because of the humanoid. Disabling the BreakJointsOnDeath property fixes this issue.
Edit:
@Vulkarin
Spoke too soon…
When I tested your solution I just wasn’t close enough for my client to take over the part, this solution does not work, it does prevent the joints from breaking but the death still replicate.
Yes, unfortunately even if disabling the BreakJointsOnDeath property were to work, it would only be a band-aid solution. As I mentioned before, the inherent risk to giving the client network ownership over a part is that they can do anything to them (such as send them straight to the void). The only fool-proof solution if you must give the client network ownership is to have your server perform checks on the npcs.