I'm using a RopeConstraint as handcuffs so when you click on a player with the handcuffs, you can jail them and pull them wherever you would like. However it gets glitchy and the jailed person can actually move by pulling the handcuff holder when he's not moving. I've tried attaching the constraints to the HumanoidRootPart, Legs, Arms, Torso and even the tool itself but none of them solve this problem. Its filtering enabled compatible currently. And if anyone knows how to solve the problem with me still being able to use the tool once I've unequipped it for the first time, please let me know.
**-- Local Script**
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
debounce = false
anim = game.ReplicatedStorage.Caught
script.Parent.Equipped:Connect(function()
mouse.Button1Down:Connect(function()
if mouse.Target ~= nil then
local Hit = mouse.Target
print("hi")
if Hit.Name == ("Torso") or Hit.Name == ("Head") or Hit.Name == ("Left Leg") or Hit.Name == ("Right Leg") or Hit.Name == ("HumanoidRootPart") or Hit.Name == ("Left Arm") or Hit.Name == ("Right Arm") then
print("hi")
local Jailed = Hit.Parent
local Jailed2 = Jailed:FindFirstChild("HumanoidRootPart")
local Jailed1 = Player.Character.Tool.Handle
script.Parent.RemoteEvent:FireServer(mouse,anim,Jailed,Jailed2,Jailed1,Hit)
end end
end) end)
**-- Script**
script.Parent.RemoteEvent.OnServerEvent:Connect(function(Player,mouse,anim,Jailed,Jailed2,Jailed1,Hit)
print("hi")
local attachmentB = Instance.new("Attachment",Jailed2)
local attachmentA = Instance.new("Attachment",Jailed1)
attachmentA.Position = Vector3.new(1,-0.7,0.3)
attachmentB.Position = Vector3.new(0,0,0.3)
print("hi")
local ropeConstraint = Instance.new("RopeConstraint",Jailed1)
ropeConstraint.Attachment0 = attachmentA
ropeConstraint.Attachment1 = attachmentB
ropeConstraint.Length = 10
ropeConstraint.Visible = true
ropeConstraint.Color = BrickColor.Black()
ropeConstraint.Thickness = 0.2
ropeConstraint.Restitution = 0.5
Jailed.Humanoid.Walkspeed = 0
local caught = Jailed.Humanoid:LoadAnimation(anim)
caught:Play()
script.Parent.Unequipped:Connect(function()
ropeConstraint:Destroy()
caught:Stop()
Jailed.Humanoid.Walkspeed
end)
end)

4 comments
That can get pretty complex it would seem. I'd just write it from scratch and have the person who's handcuffed move when the captor moves (given that they're at the distance limit)
I would prefer the captive to also be able to move around when the captor isn't
In my example they would be able to
Well, thats kinda realistic to have the criminal be able to move handcuffs.