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.
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
-- 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