Cuff System Not Working As Intended

Hello,
I have been trying to make a cuff system for hours but can’t solve this problem. When you cuff someone the person who cuffed the other will have either delayed jumps or can’t jump at all. Also movement seems to become slow at random times, especially around blocks. I also do not want to make it where the cuff system updates the cuffed player’s CFrame, I want there to be a weld so there is smooth movement. I have looked at other forum posts that relate to my problem but they don’t seem to help.

What I’ve Tried

  • Making all body parts in the person being cuffed massless and non-collidable.
  • Taking all accessories off to see if it had anything to do with them.
  • Setting the network owner to the person cuffing the other player.

Local Script

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Parent.Activated:Connect(function()
	local target = mouse.Target
	if target.Parent:FindFirstChild("Humanoid") or target.Parent.Parent:FindFirstChild("Humanoid") or target.Parent.Parent.Parent:FindFirstChild("Humanoid") then
		local target = mouse.Target.Parent
		script.Parent.CuffInfo:FireServer(target)
	end
end)

Server Script

script.Parent.CuffInfo.OnServerEvent:Connect(function(player, target)
	local cufferChar = player.Character
	local pos = (cufferChar.HumanoidRootPart.CFrame * CFrame.new(0,0,5)).p
	target:MoveTo(pos)
	local weld = Instance.new("WeldConstraint")
	weld.Parent = target.HumanoidRootPart
	weld.Name = "CuffWeld"
	weld.Part0 =  cufferChar.HumanoidRootPart
	weld.Part1 = target.HumanoidRootPart
	for i, v in pairs (target:GetChildren()) do
		if v:IsA("Part") or v:IsA("MeshPart") then
			v.Massless = true
			v.CanCollide = false
			v:SetNetworkOwner(player)
		end
	end
end)

Video

2 Likes

try -5 instead of 5 since - in the Z axis will move it in the front whilst + in the Z axis will move it back

for rotation make it as the player who cuffed rotation to the cuffed player

1 Like

That puts them in the correct place but doesn’t eliminate the movement problems for the cuffer as shown in the video.

you would have to animate some animations for the player when they are cuffed other than that its all math

I don’t see how animations would help and if math is required to fix this then what math would that be?

I’m not good in math but for now a walk-speed of 0 for that humanoid would do but if you are interested rotate the HumanoidLowerRightArm in the Z or X axis by 90 degrees

also try disabling the cuffed players controll or just simply set the cuffed player’s humanoid paltform stand true, so u dont get those weird movements

3 Likes

Setting the Platform Stand to true works, do you know if I could still play animations with the cuffed player while that is active? Or even have them walk like they would before?

I’m pretty sure that platform standing wont let u play animations, but setting cuffed player’s hip height to like 0 and set their walk speed to 0 will allow you to play animations and probably not bug

Well Ima test around with the stuff and see if it works. Thanks.

1 Like

Just found out I can still play animations during PlatformStand, thank you again for pointing this out.

1 Like

When you kill the cuffed person the cuffer also dies. I have heard this is because of the weld. Do you know how to prevent this?

you could do when cuffed humanoid dies the weld gets destroyed

humanoid.Died

Already tried that, the died event doesn’t fire in time to destroy it before.

what weld are u using?

30 letters

WeldConstraint, weld doesn’t work well with cuffs.