I need help with NetworkOwners

I am trying to make the zombies in the video always be server owned. As you can see in the video below the zombies change network owner when comming to close with my character.

image

Is there something wrong or something I am missing in the code provided?

The colors represent the network owner. The change in colors means a new network owner has been set. This is what I want to stop from happening

Try

    -- Set network ownership of all parts to server
    for _, part in ipairs(newModel:GetDescendants()) do
        if part:IsA("BasePart") then
            part:SetNetworkOwner(nil)
        end
    end

i am not entirely sure why your parts would end up switching ownership, but the welds you’re creating may be the cause of “re-enabling” that.
you can run :CanSetNetworkOwnership() on the parts before and after welding to confirm or deny my theory

image

You are a genius. Been stuck at this problem for quite some time now. Always thought that welded parts copied networkOwnerShip of the root.

Will mark what you said as the solution

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.