Hello, I am currently scripting a handcuff system for a British Army. So far, everything is perfectly fine but I am having a problem with the drag system.
I used a weld for the drag system, but the walking system gets interrupted and it walks super slowly. I have enabled massless for the handcuffed player, but that didn’t work. Any help would be greatly appreciated.
game.ReplicatedStorage.grabPlayer.OnServerEvent:Connect(function(plr, targetPlayer)
game.Players:FindFirstChild(targetPlayer.Name).isGrabbed.Value = true
plr.isGrabbing.Value = true
local weld = Instance.new("Weld")
weld.Part0 = targetPlayer.HumanoidRootPart
weld.Part1 = game.Workspace:FindFirstChild(plr.Name).HumanoidRootPart
weld.Parent = targetPlayer.HumanoidRootPart
weld.C0 = CFrame.new(0, 0, 3)
weld.Name = "grabWeld"
for i, v in pairs(targetPlayer:GetChildren()) do
if v:IsA("MeshPart") or v:IsA("Part") then
v.Massless = true
end
end
end)
This is an issue anyone making handcuffs has faced in the last few years. It’s a replication issue with Roblox. There are a few different things you can try. Firstly, what I’ve seen many do: Each frame set the cuffed player’s location to the location directly in front of the player cuffing them. Alternatively, you can mess, or remove the humanoid in the cuffed player.
The reason this issue happens is because players in Roblox have network ownership over their player. When two players are welded, there is a conflict over which player has network ownership and it results in sometimes both, sometimes neither, and sometimes the wrong person having network ownership which results in funky behavior.
Hello, thanks for trying to help but I have just figured it out right as you replied. The fix was just to enable the handcuffed players’ humanoid’s platform stand.
That works if it’s not an actual player you are handcuffing. However, if you use another player and have them try to move while cuffed they likely will be able to. I’m unsure though, things may have changed since the last time I tried to do this.