This script is for a brick that clones the avatar who steps on it, to avoid crashes I used debounce and a 60 second wait, but the script will only work once and won't reset.
Anyone know what's causing the problem?
local debounce = false
game.Workspace.ClonedPart.Touched:Connect(function(hit)
if not debounce then
debounce = true
script.Parent.BrickColor = BrickColor.new('Really red')
local avatar = hit.Parent
avatar.Archivable = true
local clonedPerson = avatar:Clone()
clonedPerson.Name = ('SellBot')
clonedPerson.Parent = game.Workspace
clonedPerson.Position = Vector3.new(15.23, 5.5, 207.43)
debounce = false
wait(60)
debounce = true
script.Parent.BrickColor = BrickColor.new('Medium stone grey')
end
end)

2 comments
try using if debounce == false or changing the wait time
@ProqrammedGreen "not debounce" and "debounce == false" are the same. Changing the wait time won't make a difference.