So is there a way to make every part in the workspace to be under the players network ownership?
It’s for a single player game, so it should probably be able to do that right?
Is it also possible for almost everything to be client-sided?
So is there a way to make every part in the workspace to be under the players network ownership?
It’s for a single player game, so it should probably be able to do that right?
Is it also possible for almost everything to be client-sided?
If it’s singleplayer as in server limit of 1 I would leave it to the server to determine network owner based on necessity, otherwise it may impose a bigger burden on the client than necessary. There would be no benefit to the client if they’re simulating unanchored parts they’re not interacting with, when the server has such a light load with no other players to deal with. And since it’s one player, the client is going to be chosen to be the device to simulate physics when they’re near parts anyways.
Also consider that network ownership can’t be applied to anchored parts, which would/should be almost everything under workspace. If you have a finite number of things like vehicles and doors a player may interact with you could set them network owner to it, when necessary, but without any other players I would expect the performance difference between forced client ownership and letting the server decide to be infinitesimally small.
Oh okay I’ll see what limiting it to 1 person does, thanks.
local RunService = game:GetService(“RunService”)
local Owner = game:GetService(“Players”):WaitForChild(“username”, 20000)
_G.PhysicThrottle = function()
for i, Descendant in pairs(workspace:GetDescendants()) do
if Descendant:IsA(“BasePart”) and Descendant.Anchored == false then
Descendant:SetNetworkOwner(Owner :: Player);
end
end
end
RunService.Stepped:Connect(_G.PhysicThrottle)
What do I put this in and where?
put this in serverscriptservice, make sure the part is checked as anchored replace the source with my edited up and make sure username is the person u want the owner as. and fyi this will cause animate bugs so slow stuff for everything but you can see for yourself.
This is possible with a simple script. Server sided:
for i, part in ipairs(game.Workspace:GetDescendants()) do
part:SetNetworkOwner(game.Players:GetPlayers()[1])
end
Make sure to wait for a player to join the game before activating this script.
repeat wait(1) until #game.Players:GetPlayers() == 1
Okay well thanks guys, I will see which one works best.