:SetNetworkOwner() function not appearing on anything

I want to make models that spawn have a network owner to perhaps make physics better, however, when I try to do the network owner function on them, it doesn’t work. Any idea why?

local car = game.ServerStorage["Car"]:Clone()
car.Parent = workspace.Cars
			car.Name = script.Parent.Parent.Name.."Car"
			car:SetPrimaryPartCFrame(script.Parent.Handle.spawn.WorldCFrame)
			car.LicensePlate.SurfaceGui.TextLabel.Text = script.Parent.Parent.Name.."'s Car"
			car:SetNetworkOwnershipAuto(game.Players:GetPlayerFromCharacter(script.Parent.Parent))

I’m pretty sure that the SetNetworkOwnership() function can only be used on BaseParts. This is a quote from the wiki:

I’m also using this on large-scale destructible maps. Does this mean I’ll have to loop through every part in the map model and set its network owner?

Unfortunately yes. I am not sure why you’d need to set NetworkOwnership of that many parts, but if you do, you’d have to loop through them. When it comes to destruction, it might just be better to handle it on the server instead of setting ownership. Not sure though, that’s a topic for another post.

Problem is, it makes everything else really slow especially because the maps have small destructible parts.

Well, then you’ll have to figure out the proper way to set ownership. I haven’t really used SetOwnership on this scale before, so I can’t really give recommendations. Regardless, you’ll have to individually set each part unfortunately, unless it is an assembly (no idea what that is), which sets the ownership of every unanchored part by itself. Quoted from the wiki:

By the way, if the primary part’s network owner is one thing, does the whole model have the same network owner?

I am not quite sure. Roblox does mention something about assemblies, but doesn’t clarify at all. In their example, they only set the NetworkOwnership of the vehicle seat, so that must suggest that everything else also gets set to that. Now, I can’t guarantee you that it works for everything, but you can try it out.

EDIT: I looked at it more, and it seems that an “assembly” is just everything that has been welded together by a WeldConstraint or Motor6D. Read more about assemblies here.

If the parts are welded, I’m pretty sure you can just setnetworkowner to the primarypart.

Problem is, all of the welds in the maps are actual welds.

I already tried making it :SetNetworkOwner(game.Players:GetPlayerFromCharacter(script.Parent.Parent)) and :SetNetworkOwner(script.Parent.Parent.Name) and :SetNetworkOwner(script.Parent.Parent.Name)

I also tried to do the network owner on the cloned car.

From the docs:

<code>SetNetworkOwner(player)</code> Assigns this Instance to the player. This is the same thing as using SetNetworkOwnerAuto, except it only works on the server. The player parameter is a Player object. If the player is nil, the Instance belongs to no one.

This means you cannot call this method on the client-side.