Problem With Cuff System

local tool = script.Parent
local player = game.Players.LocalPlayer

local arrested = false

tool.Equipped:Connect(function(mouse)
tool.Activated:Connect(function()
if arrested == false then
arrested = true
if mouse.Target then
local target = mouse.Target.Parent
if target:FindFirstChild(‘Humanoid’) then
while arrested == true do
wait(0.5)
target:FindFirstChild(“HumanoidRootPart”).CFrame = player.Character.HumanoidRootPart.CFrame + (player.Character.HumanoidRootPart.CFrame.LookVector * 5)
end
else
arrested = false
end
end
end
end)
end)

when i click again it stops it from teleporting, but after i reequip it then it doesnt teleport continuously anymore. Why?

(this is a local script inside a tool)

1 Like