So I have a working handcuff, but when you cuff another person and that person cuffs you, you go flying, I have a simple solution, When that player is handcuffed, they can't use their tools. Here is the script inside of the handcuffs, they still work with this script, The just don't disable the other person's backpack. Sorry long code, The code that I put into it is on line 48, and line 68.
local RemoteEvent = script.Parent:WaitForChild("RemoteEvent")
local TargetTorso = nil
local Using = false
function CheckForTargetTorso(part)
if part.Parent:IsA'Model' and part.Parent:FindFirstChildOfClass'Humanoid' then
local char = part.Parent
local torso
if char:FindFirstChild'Torso' then
torso = char.Torso
elseif char:FindFirstChild'UpperTorso' then
torso = char.UpperTorso
end
return char, torso
end
end
function CheckForTorso(player)
local Char = player.Character
if Char:FindFirstChild'Torso' then
return Char.Torso
else
return Char.UpperTorso
end
end
RemoteEvent.OnServerEvent:Connect(function(player, state, part)
if state == 'Cuff' then
local target = nil
local playerTorso = nil
target, TargetTorso = CheckForTargetTorso(part)
playerTorso = CheckForTorso(player)
if target then
Using = true
RemoteEvent:FireClient(player, 'Use')
spawn(function()
if Using then
TargetTorso.Anchored = true
TargetTorso.CanCollide = true
for i, Toolsxd in pairs(player.Backpack:GetChildren()) do
if Toolsxd:IsA("Tool") then
Toolsxd.Enabled = false
end
end
end
while Using and wait() do
TargetTorso.CFrame = playerTorso.CFrame * CFrame.new( 0, 0, -5 )
end
end)
end
elseif state == 'UnCuff'then
Using = false
TargetTorso.Anchored = false
TargetTorso.CanCollide = false
for i, Toolsxd in pairs(player.Backpack:GetChildren()) do
if Toolsxd:IsA("Tool") then
Toolsxd.Enabled = true
end
end
wait()
end
end)

3 comments
Thanks for the answer! Let me try it out.
Hm didn't work, I put it where i needed to put it, And I made a seperate Local Script for the other thing.
And yes, I added a RemoteEvent in Replicated Storage.