So what I want to do is that when I trigger the proximity prompt an explosion gets created but setting it to the position of the barrel doesnt work so can someone tell me how to do it?
My Script:
local Barrel = script.Parent
local Prox = script.Parent.ProximityPrompt
local BarrelPosition = script.Parent.Orientation
Prox.Triggered:Connect(function()
local Explosion = Instance.new("Explosion")
Explosion.BlastPressure = 200000
Explosion.BlastRadius = 3
Explosion.DestroyJointRadiusPercent = 0
Explosion.ExplosionType = Enum.ExplosionType.CratersAndDebris
Explosion.Parent = workspace.Explosions
Explosion.Position = Vector3.new(BarrelPosition)
Explosion.TimeScale = 1
Explosion.Visible = true
Prox.Enabled = false
Barrel.explosion:Play()
Barrel.Transparency = 1
Barrel.CanCollide = false
wait(10)
Barrel.Transparency = 0
Barrel.CanCollide = true
Prox.Enabled = true
end)