Every time i attempt debouce it doesn't work, what is it i'm doing wrong?
function onTouched(hit)
local debounce = true
if debounce == true then
debounce = false
game.ServerStorage.GameFiles.Storage.Area1:Clone().Parent = game.Workspace.GameFiles.MapStorage
local part = game.Workspace.GameFiles.MapStorage.Area1.Location.Position
wait(2)
hit.Parent:moveTo(part)
game.Workspace.GameFiles.MapStorage.SpawnMap:Destroy()
end
wait(10)
debounce = true
end
connection = script.Parent.Touched:connect(onTouched)

2 comments
I'll save this and use it as a template, Thank you!
Youre welcome