My problem, It WORKS but DOESN'T WORK like I would. What I mean by that is, whenever an explosion hits a part, it's supposed to be removed. But the thing is, when it hits multiple parts, it only destroys one, the bricks are unlocked and I don't know what else to do with this. Nothing in output comes up.
e = Instance.new("Explosion", game.Workspace) e.Position = script.Parent.Position e.BlastPressure = 1000000 e.BlastRadius = 10 e.Hit:connect(function(part, distance) if part:IsA("Part") and part.Locked == false then part:Destroy() else print(part.Name .. " is not a part") end
It was missing an end, it may or may not be the problem but try it out and let me know.
e = Instance.new("Explosion", game.Workspace) e.Position = script.Parent.Position e.BlastPressure = 1000000 e.BlastRadius = 10 e.Hit:connect(function(part, distance) if part:IsA("Part") and part.Locked == false then part:Destroy() else print(part.Name .. " is not a part") end end)