The main problem is that when the bindable event fires, both the explosion and the spawning of the 11 mobs happens more than once.
Here’s the code, if I can figure out where to place the debounce on this script I’ll be set.
for _, parts in pairs(car:GetDescendants()) do
if debounce then return end
if parts:IsA("BasePart") then
parts.Touched:Connect(function(hit)
if hit == Boulder then
local explosion = Instance.new("Explosion")
if Hitbox then
remoteevent:Fire()
explosion.Position = Hitbox.Position
explosion.Parent = workspace
explosion.ExplosionType = Enum.ExplosionType.Craters
explosion.BlastRadius = 20
explosion.BlastPressure = 70
parts.Anchored = false
debounce = true
wait(10)
debounce = false
parts:BreakJoints()
end
end
end)
end
end
Many thanks.