Network Ownership

I own a combat game and we use Network Ownership to make NPC movement smoother and be less expensive to the server.
As you might know, Network Ownership not only gives the client permission to control the movement of physics parts but it also gives permission to control Humanoids, meaning that Humanoid State Types would be replicated to the server if altered on the client, which is a huge problem. Any exploiter could insta kill any Humanoid by doing:

local Humanoid
Humanoid:SetHumanoidStateEnabled(Enum.HumanoidStateType.Dead, true)
Humanoid:ChangeState(Enum.HumanoidStateType.Dead)

I’d like to bring a discussion on what could be a good security measure for this. Is there any way to prevent the client from having control of NPC Humanoid State Types without taking Network Ownership?

I don’t think Network Ownership is the way for this.

You can set their position on the server without making them smooth and just let the client smoothen it using an animation instead.

1 Like

yeah fase is right, keep the physics, health and position for the NPCS on the server-side but use client-sided Animations/interpolation for smooth animations/movement, and then use server-sided sanity checks when checking if damage dealt was sane. Giving network ownership to the nearest client isn’t ideal for important NPCs.