It will sound silly but I don’t know why it happens so I ask the community for help, I have this event that when a block called “Box” touches a part, it returns it to a specific coordinate, the problem happens when it touches the block again and it doesn’t send it, it just delete:
local debounce = false
script.Parent.DeathBox.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player==nil then
script.Parent.Box.CFrame = CFrame.new(Vector3.new(325.628, 70.447, 6.664)) * CFrame.Angles(0, -0, 0)
end
end)
local debounce = false
script.Parent.DeathBox.Touched:Connect(function(hit)
if debounce == false then
debounce = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
script.Parent.Box.CFrame = CFrame.new(Vector3.new(325.628, 70.447, 6.664)) * CFrame.Angles(0, -0, 0)
wait(1) -- Time to Start The Function agine
debounce = false
end
end)