I am making a MAC Cannon round fire from a UNSC Frigate, and what I want it to do is completely delete the building or obstacle in front of it. I mean that literally, anything close to the beam that is fired gets destroyed permanently.
What this does is it gets all parts touching the thin beam using :GetTouchingParts, then it creates an explosion on those parts with a BlastPressure of 1, and a BlastRadius of 10,000 (For testing purposes). It works correctly… for 20 parts of the whole building and the rest of it is completely fine. I will attach a video of what it’s doing.
Are there any other good alternatives to Explosion.Hit that I can use for what I’m trying to achieve? Any help is greatly appreciated!
for _,V in pairs(script.Parent.Beam:GetTouchingParts()) do
task.spawn(function()
print(V.Name)
local Explosion = Instance.new("Explosion", workspace)
Explosion.Position = V.Position
Explosion.BlastPressure = 10000
Explosion.Visible = false
Explosion.BlastRadius = 10000
Explosion.Hit:Connect(function(Part)
task.spawn(function()
local OldTransparency = Part.Transparency
Part.Transparency = 1 -- Part:Destroy() didn't work
wait(10)
Part.Transparency = OldTransparency
end)
end)
end)
end```