Welding local model to another players character?

Hello!
I am currently trying to weld a local model containing un-anchored parts with rope constraints, to the character of a different player.

The issue I’m facing, is that the network ownership of the model, gets set to the other player. Even though the model is entirely client-sided.

This is causing the physics of that model to not be calculated, unless it is within like 3 studs from the client that created it…

Ive read that in this reply, that the issue causing this, is related to the server and client disagreeing on which part is considered the root? Essentially breaking replication for the model?
Are local parts guaranteed to have network "ownership" set to the client that created them?

The reply is from 4 years ago, so I’m not sure if this has changed or not. But is there any way to solve this or get around it?

Thanks!

1 Like

I believe welding client owned parts to players/parts that the server “could have control over” is still an unreliable method. I’ve head changing the RootPriority of these parts to very high (max 127) can help but I don’t know how much. As parts get further away from the player, the server takes over to compute physics. Have you manually set the network ownership? The example is a ball (sphere) created with network ownership assigned to the client so the local script is put in charge of the force applied.

Server Script

game.Players.PlayerAdded:Connect(function(player)
	game.Workspace.Part:SetNetworkOwner(player)
end)

Local Script

local Sphere = game.Workspace.Part
local SphereForce = Sphere.BodyForce
 
local ContextActionService = game:GetService("ContextActionService")
 
local function pushBall(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.End then
		SphereForce.force = Vector3.new(0,0,0)
	else
		if actionName == "Left" then
			SphereForce.force = Vector3.new(-100,0,0)
		end
		if actionName == "Right" then
			SphereForce.force = Vector3.new(100,0,0)
		end
	end
end
 
ContextActionService:BindAction("Left", pushBall, false, "j")
ContextActionService:BindAction("Right", pushBall, false, "l")
1 Like

Hey thanks for replying! I have attempted to increase the root priority, and although it does work, it also introduces other undesirable behaviors…

As you can see in the video attachment, once the model is created and welded to the other player, the entire other players character network ownership, gets set to the client that created the model.

But also visible in the video, the client that creates the model for itself, begins to move incorrectly. While also appearing to be affected by the physics of the model, even though all parts of said model, have “Can Collide” set to false, and “Massless” set to true.

1- (Client on the left creates the model for itself)
2- (Client on the right creates the model for the first client)
3- (You can see the model’s un-anchored parts, in the position of the right arm)

The model is cloned from replicated storage locally. So it is not possible to set it manually, as the model is client-side only.

This method doesn’t work for this specific model. Reason being, the option to even spawn the model in the first place, is decided individually by the players.

So some players should never spawn the model.
What else could i try?

Thanks again for replying!

1 Like