The problem is, the game lags a lot when the builds are spawning in (obviously), and workspace lag is a big reason why. So I thought, why don’t I just keep all the parts anchored until the build is finished loading? I did that, and now I’m getting messages saying that I cannot set networkownership to anchored parts or parts welded to anchored parts. What could I do to keep the build ‘anchored’ in some way and still let network ownership be set?
You cannot set Network Ownership to a Anchored BasePart because Network Ownership applies to Objects Affected by Physics (aka unanchored BaseParts), since the Object is Anchored, no physics will be Applied to it, so therefore: No Network Ownership
Probably the best thing you can do is what @Dede_4242 provided, but instead of a loop, you can use a Changed Event to check if the Anchored Property is false to Apply Network Ownership, which is way more efficient.
Network ownership is essentially which device should be controlling the physics, anchored parts don’t have physics, and thus setting their ownership is pointless anyway.
You could wait for every part to load and then set them all to unanchored before setting the network ownership, but you can’t set the ownership of an anchored part.
Take all the parts on the players plot and put them in serverstorage.
Copy that model from serverstorage and paste it into workspace.
Unanchor all the parts for next step
Go through every model, identify them, and place the correct scripts in them to let the client interact with that specific block.
Move the entire build to the set spawn location
@DasKairo I know about networkownership, I’m just trying to find a way for the game to not lag as bad.
The entire reason why the game is lagging is because all the parts need to be unanchored for setup (which includes setting the network ownership of some of them), but the setup loop takes a lot of time to complete depending on the size of the build. So, there is this 16000 part unanchored model moving around (because some scripts edit model appearance size etc. while setting up)
I know I can’t cancel out the lag, but I can stop the server from dying for 30 seconds and turn that into one second by unanchoring the model AFTER setup is complete. But, setting network ownership is part of the setup process.
Did you read my posts? I’ve made it clear that the game is a building game. The player’s plot needs to update whenever something is placed. Keeping track of an identical model in replicated storage just uses up twice the amount of storage and gives exploiters another method to mess with the game.