local touch = false -- Do not touch/change
function regen(hit)
if not touch then -- Debounce
touch = true
script.Parent.BrickColor = BrickColor.new("Maroon")
-- Start Of Meat Of Script --
DD = game.ServerStorage.Dinghy:Clone()
DD.Parent = game.workspace.RegenDinghy.Spawner
-- End Of the Meat Of Script
wait(3) -- Until usable again
script.Parent.BrickColor = BrickColor.new("Royal purple")
print("Good") -- Confirms script went through
touch = false
end
end
script.Parent.Touched:connect(regen)
Here is my perfectly functioning regen script. If it's possible, could I get a heads up on how to prevent multiple parts(in my case, boats) being spawned all at the same spawn in the exact same spot simultaneously? I don't want all the boats joining together.
I was thinking if I made the spawner check if there were parts in its area, but I'm not too sure on how.
Comment if something is confusing.
