local prisons = game.Workspace.Prison:GetChildren()
script.Parent.Equipped:connect(function(mouse) mouse.Button1Down:connect(function() if mouse then if (script.Parent.Parent.Head.Position - mouse.Target.Parent.Parent.Head.Position).magnitude <= 10 then -- Change "10" if you want to. This is the range of the arrest tool. The higher the number the longer the range you can arrest the player if mouse.Target.Parent:isA("Accessory") then local char = mouse.Target.Parent.Parent char.HumanoidRootPart.CFrame = prisons[math.random(1,#prisons)].CFrame + Vector3.new(0,3,0) -- Randomly Puts the Prisoner to the Cell end end if mouse.Target:isA("Part") then if mouse.Target.Parent.Humanoid then local char = mouse.Target.Parent char.HumanoidRootPart.CFrame = prisons[math.random(1,#prisons)].CFrame + Vector3.new(0,3,0) -- Same as this end end end end) end)
I tried it in the real game and it doesn't work like it's supposed to. I made a part where they teleport to the jail cell and followed the tutorial why didn't it work? I tried script and local script.

4 comments
please use code blocks
ye
yeah
?