How do i give myself network ownership of the whole server

all of its instances
i wish to have control of parts players models particles and others

the reason why is because there is server lag
but when i run it with studio it runs flawlessly
when ever it runs ingame where is animation lag and its not smooth

1 Like

I don’t believe forcing network ownership to one client would make your lag issue any better… worse performance would be my expectation since you’re relying on one client.
I’d advise monitoring script performance and debug why it’s having problems rather than introducing more code to quick fix it.

i have a really good network so i wish to continue with this
i host servers with 100 players so i think i can handle this
a minecraft server with port forwarding

Hard to compare the architecture between a dedicated Minecraft server and a Roblox server, you wouldn’t be the ‘host’ you would be an end-client that the server is handing over network responsibility to. What happens when you aren’t actively playing your game?

Anyways… if you wanted to iterate everything in workspace, try:

local player = --[get your Player instance here]

for _, v in pairs(workspace:GetDescendants()) do
	if v:IsA("BasePart") then--network ownership is only a function of BaseParts
		if not v.Anchored and #v:GetJoints() == 0 then--only works on unanchored, unwelded parts
			v:SetNetworkOwner(player)
		end
	end
end

I don’t see the reason why you would want to do this unless you’re making like a singleplayer only game. But even then I still don’t see why you would do this unless its like a physics object youre interacting with.

In my experience when you give all of the network ownership of every player’s character to one player, those who don’t have the network ownership begin having input lag, even when moving their character. That is because Im pretty sure every player networkowns their own character.

If besides this you still wanna do this then yeah just iterate across all objects in the workspace to networkown them to your player like how mp3face told you to

2 Likes

If you do this, it’ll make everything feel smooth for you, but it’ll lag horribly for everyone else.

1 Like

I think it will just make the parts vulnerable, not worth imo.