It is an enemy spawner script, and I just finished writing it (at the time of me posting this.) It basically just pulls a model from the lighting and inserts it where ever it was in the Workspace where you placed it, but it over clones it. Anyways to prevent this?
local part = script.Parent local Kamikaze = game.Lighting.Kamikaze part.Touched:connect(function() local Enemy = Kamikaze:Clone() wait(1) Enemy.Parent = Workspace wait(1) end)
You need what's called a Debounce, because, this will just keep firing and doing the exact same thing whenever it's touched
local part = script.Parent local Kamikaze = game.Lighting.Kamikaze local debounce = false part.Touched:connect(function() if debounce then return end --Check if it's already running debounce = true -- This event is running! local Enemy = Kamikaze:Clone() wait(1) Enemy.Parent = Workspace wait(1) debounce = false -- This event has stopped, you can now touch again! end)