I am currently working on a big project, and I have two problems: One is that a bullet can activate this, and two: is that it stays after you touch it. If there is a way to destroy the brick that this script is in, along with the script, I'd appreciate the help. :)
local part = script.Parent
local EnemyGroup3 = game.Lighting.EnemyGroup3
local debounce = true
part.Touched:connect(function()
if debounce == true then
debounce = false
local Enemy = EnemyGroup3:Clone()
wait(1)
Enemy.Parent = Workspace
wait(120) --waiting 3 seconds before setting debounce to true again
debounce = true
end
end)
edit: And a way to make it so that only a player can activate this.

2 comments
Actually, it's a enemy spawn-field. It's transparent to begin with. What I'm asking is if it's possible to make the brick destroy itself.
Why?