script.Parent.Touched:Connect(function()
if not debounce then return end
debounce = true
for i = 1, 3 do
local Clone = game.ServerStorage.ClonePart:Clone(3)
Clone.Parent = workspace
Clone.Anchored = false
task.wait()
end
task.wait(5) – change this to increase/decrease cooldown time
debounce = false
end)
so i want to spawn 3 npcs but it only spawns one can anyone help me?
local debounce = false
script.Parent.Touched:Connect(function()
if not debounce then return end
debounce = true
for i = 1, 3, 1 do
local Clone = game.ServerStorage.ClonePart:Clone()
Clone.Parent = workspace
Clone.Anchored = false
task.wait()
end
task.wait(5)
debounce = false
end)