Basically, i want to prevent the person who is in handcuffs from using the handcuff that the person who arrested him, due to the fact that they can arrest each other and they cannot move at all. i only want one person to be able to use the handcuff.
function DETAIN(char)
if char:findFirstChild("Humanoid") then
char.Humanoid.PlatformStand=true
char.Humanoid.WalkSpeed=0
char.Humanoid.
end
WELD = Instance.new("Weld",char.Torso)
WELD.Part0 = char.Torso
WELD.Part1 = ply.Character.Torso
WELD.C1 = WELD.C1 * CFrame.new(0,.05,-2)
char.Torso["Left Shoulder"].Part1 = nil
char.Torso["Right Shoulder"].Part1 = nil
if char:findFirstChild("Left Arm") then
LWELD = Instance.new("Weld",char.Torso)
LWELD.Part0 = char.Torso
LWELD.Part1 = char["Left Arm"]
LWELD.C1 = CFrame.new(0.5, -0.30, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(40), 0, math.rad(-45))
end
if char:findFirstChild("Right Arm") then
RWELD = Instance.new("Weld",char.Torso)
RWELD.Part0 = char.Torso
RWELD.Part1 = char["Right Arm"]
RWELD.C1 = CFrame.new(-0.5, -0.30, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(40), 0, math.rad(45))
end
end
function RELEASE(char)
if char:findFirstChild("Humanoid") then
char.Humanoid.PlatformStand=false
char.Humanoid.WalkSpeed=16
end
if RWELD~=nil then char.Torso["Right Shoulder"].Part1 = char:findFirstChild("Right Arm"); RWELD:Destroy(); end
if LWELD~=nil then char.Torso["Left Shoulder"].Part1 = char:findFirstChild("Left Arm"); LWELD:Destroy(); end
if WELD~=nil then WELD:Destroy() end
end
function PRISON(char)
local ArrestGUI = script.reason:Clone()
ArrestGUI.Parent = script.Police.Value.PlayerGui
ArrestGUI.ReasonFrame.LocalScript.Disabled = false
funlol = script.reas.OnServerEvent:connect(function(plr,rea)
if char:findFirstChild("Humanoid") then
char.Humanoid.PlatformStand=false
char.Humanoid.WalkSpeed=16
end
if WELD~=nil then WELD:Destroy() end
ArrestReason[2] = "*" ..script.Police.Value.Name .. " *\n"
ArrestReason[4] = "" ..rea .."\n"
post(char.Name,ArrestReason[1],ArrestReason[2],ArrestReason[3],ArrestReason[4])
game.Players:GetPlayerFromCharacter(script.Parent).TeamColor=BrickColor.new("Really black");
game.Players:GetPlayerFromCharacter(script.Parent):LoadCharacter()
funlol:disconnect()
end)
end
script.CMD.OnServerEvent:connect(function(plr,arg)
if arg=="Prison" then PRISON(script.Parent)
elseif arg=="Release" then RELEASE(script.Parent) return end
end)
DETAIN(script.Parent)

1 comment
Sorry but that's about it. I didn't learn OnClientEvent. Could you help me in team create?