Rope constraint causes really bad movement & lag on client

The best way I could describe this is setting a camera subject to another players character and letting the camera subject control it, It is extremely laggy and takes like 500ms to do anything.

The laggy player in this demonstration is player2, Player1 has no lag.

I have tried setting the networkownership to nil, the player etc, to no avail, I would appreciate help.

I have seen other methods on visualizing it on the client, but I was hoping there would be another way cause I don’t really want to refactor it, I will if I have to though

Here is a sample of my code;

if result and result == true then
			if pairPlayer == player then return end

			local PairAttachment, PlayerAttachment = pairPlayer.Character.HumanoidRootPart:FindFirstChild("AttachmentRope"), player.Character.HumanoidRootPart:FindFirstChild("AttachmentRope")
			print(PairAttachment, PlayerAttachment)

			if PairAttachment and PlayerAttachment then
				rope.Attachment0 = PairAttachment
				rope.Attachment1 = PlayerAttachment
				
				moveOnWithMap(player, pairPlayer)
			end
		else
			promp.Enabled = true
		end
	local RopeConstraint = Instance.new("RopeConstraint")
	RopeConstraint.Parent = hum
	RopeConstraint.Name = "PlayerRopeAttachment0"
	RopeConstraint.Length = 15

	local attachment = Instance.new("Attachment")
	attachment.Name = "AttachmentRope"
	attachment.Parent = hum.HumanoidRootPart

I am afraid I am not understanding the issue, is the issue a delay between server and client or a lag in frame rate on the client’s end?

1 Like

This is simply just due to network ownership, making the rope on the server will always have this problem because you can’t have two clients take network ownership over the same object. Only way to probably make it work is make a rope on both clients instead of the server.

3 Likes

hey, thanks for the reply

i tried this, i’m not sure whether or not this is how i’m supposed to do it? I’m assuming not LOL

for context i’m creating the attachment on the server, and the rope constraint on the client.

Insane input lag, You can see it when I jump, There is like a 500ms delay after the animation starts.

I have learned i’m supposed to do it on the client, Like I thought, But I don’t know what the process is for the client.

1 Like

Guess Roblox physics are more funky than I thought, perhaps a custom solution would be more in place for something like this.

1 Like

What I would do is make a client script for each client, check the magnitude between the two characters and add a opposite force if one client gets further than a set distance.

2 Likes

Alright, thank you! I’ll try that.