script.Parent.Handle.Touched:Connect(function(hit)
while(true) do
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
Players = game.Players:GetPlayers()
wait(1)
for i,v in pairs(Players) do
if v.Backpack:FindFirstChild("Gun") then
hit.Parent:MoveTo(game.Workspace.Prison.Position)
end
end
end
end)
I want the player to teleport (when touched by the handcuffs) to the prison if they have a gun in their backpack. But it's not doing anything when they are touched by the handcuffs!
