Why when I use Cookie’s Cuffs System it work only to make the dummy/player humanoid root part to us, but i can’t move myself? This is the script
-- Server Script--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local detainEvent = ReplicatedStorage:WaitForChild("DetainEvent")
local ArrestUser = detainEvent:WaitForChild("arrestUser")
local ReleaseUser = detainEvent:WaitForChild("releaserUser")
---Main
local function ReleaseUserF(Player)
local P2 = Player.Character.HumanoidRootPart.CuffWeld.Part1
local P2Instance = game.Players:FindFirstChild(P2.Parent.Name)
Player.Character.HumanoidRootPart.CuffWeld:Destroy()
for i,v in ipairs(P2.Parent:GetDescendants()) do
if v:IsA("MeshPart") then
v.Massless = false
end
end
P2.Parent.Humanoid.WalkSpeed = 16
P2.Parent.Humanoid.JumpPower = 50
P2.Parent.Humanoid.PlatformStand = false
end
ArrestUser.OnServerEvent:Connect(function(Player, Victim)
local PlayerInstance = game.Players:FindFirstChild(Victim.Parent.Name)
local P1 = Player.Character.HumanoidRootPart
local P2 = Victim
local offset = Vector3.new(0,0.015,-5)
Victim.CFrame = P1.CFrame*CFrame.new(offset)
local NewConstraint = Instance.new("WeldConstraint")
NewConstraint.Parent = P1
NewConstraint.Part0 = P1
NewConstraint.Part1 = P2
NewConstraint.Name = "CuffWeld"
P2.Parent.Humanoid.PlatformStand = true
Victim.Parent.Humanoid.WalkSpeed = 0
Victim.Parent.Humanoid.JumpPower = 0
for i,v in ipairs(Victim.Parent:GetDescendants()) do
if v:IsA("MeshPart") then
v.Massless = true
end
end
print("Arrest")
end)
ReleaseUser.OnServerEvent:Connect(function(Player)
ReleaseUserF(Player)
end)
-- Local Script --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DetainEvent = ReplicatedStorage:WaitForChild("DetainEvent")
local Players = game:GetService("Players")
local tool = script.Parent
local client = Players.LocalPlayer
local cursor = client:GetMouse()
local SomebodyArrested = false
local ArrestUser = DetainEvent:WaitForChild("arrestUser")
local ReleaseUser = DetainEvent:WaitForChild("releaserUser")
--Tool checker
tool.Activated:Connect(function()
local Target = cursor.Target
if Target then
local Victim = Target.Parent:FindFirstChild("HumanoidRootPart")
if Victim and SomebodyArrested == false then
SomebodyArrested = true
ArrestUser:FireServer(Victim)
else
if SomebodyArrested == true then
ReleaseUser:FireServer()
SomebodyArrested = false
end
end
end
end)