Is it Possible to SetNetwork to Two Players?

Hello, Im Making an Obby About 2 Player in 1 Character, And Everything has been going well so far, 1 player is in control of movement and 1 is in control of Jumping

–how my script works summarized >_>

Im pretty uh noobie at scripting so i didnt use any advanced technique to do it but how i did it is, the mover actually controls the character and the jumper character is immobilized somewhere else and his camera subject is the mover’s character, the mover cannot jump but the jumper when press space will make the mover character jump, and it works, the timing is also good, like when i press space as a jumper , the mover character jump immidietly without any delay, But theres a problem

Edit : The left is the mover, the right is the jumper <_<

As you can see , when i as the jumper press space, the mover jump exactly in time but in jumpers POV , the jump is delayed, laggy or choppy, and when the mover moves, the jumper POV sees it as choppy as well, it still work as intended but the choppyness will reduce user performance cuz timing is needed for this 2 player obby >_>

–Solution i try

I Searched about this SetNetworkOwner() and tried it, but it went uh, wrong as the character was unable to move, i wont show the entire script cuz it messy and you’ll probably vomit of how spaghetti code it is lol but heres the important part

if x >= 2 then --if both are ready
	tp = CharModel:Clone() -- clone their character
	tp.Parent = game.Workspace
	local phum = tp:FindFirstChild("Humanoid") -- their character hmanoid
	local phumroot = tp:FindFirstChild("HumanoidRootPart") -- their character root part
			
	for _,plr in pairs(PlrService:GetChildren()) do -- get both player, random mover / jumper
				
		if m == nil then -- if mover isnt taken then ok
			m = plr
			plr.Character = tp -- the mover OWNS the character
		else
			j = plr -- if mover is taken then plr be jumper
			phumroot:SetNetworkOwner(plr) -- If this line not exist it works but choppy, tried this but not work

		end
				
	end
			
	SRole:FireClient(m,0,phum) -- just informs the mover they mover
	SRole:FireClient(j,1,phum) -- just informs the jumper that they jumper
			
end

Im not really advanced coder but i want this to work, can anyone tell me what Possible way or possible method i can try, you dont exactly have to try me to send the code and you fix everything but helping me find a method that can be a solution would help a lot <3

2 Likes

Only one client (or the server) at a time can own a physics part.

There will inevitably be a delay between the two clients. Online games use many tricks to hide this delay, but it is always there.

2 Likes

Awwh thats unfortunate, i dont think im experienced enough to come up with a trick to lessen or reduce this delay so i guess i’ll find a way to better user experience with this delay in mind, thank you

1 Like

Luckily, that is the most important trick that people use :slight_smile:

1 Like

If you’re extremely desperate to remove the delay and it’s like a stop at nothing then I would recommend using Chickynoid, server authoritative character replacement | Roblox
It makes the character server sided also reducing the delay. It is probably hard to setup but it would definitely fix it.

1 Like