Hello everyone,
I’m making a custom explosion using the Explosion
instance and it mostly worked well. However, when I use a part to visualize where the explosion is at it doesn’t actually cover the full range as show in the picture below:
as you can see the visualizer is nowhere near the part (the small one on the right) yet the explosion detected it.
here is how I create the visualizer:
local Radius = 100
local Explosion = Instance.new("Explosion")
local BombPart = Instance.new("Part")
BombPart.Size = Vector3.new(1,1,1)
BombPart.Shape = Enum.PartType.Ball
BombPart.Anchored = true
BombPart.CanCollide = false
BombPart.CanTouch = false
BombPart.CanQuery = false
BombPart.Color = Color3.fromRGB(0,0,0)
BombPart.Material = Enum.Material.ForceField
BombPart.Position = Part.Position
Explosion.BlastRadius = Radius
Explosion.Position = Part.Position
Explosion.Visible = false
Explosion.DestroyJointRadiusPercent = 0
Explosion.BlastPressure = 0
BombPart.Parent = workspace
Explosion.Hit:Connect(function(hit)
print(hit)
end)
local Tween = TweenService:Create(BombPart,TweenInfo.new(1),{Size = BombPart.Size * Vector3.new(Radius,Radius,Radius)})
Explosion.Parent = workspace
Tween:Play()
Thank you.