Get Parts Position

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)

uh why is it not in #help-and-feedback:scripting-support

You wrote

local BarrelPosition = script.Parent.Orientation

instead of

local BarrelPosition = script.Parent.Position

1 Like

Already tried it but it didnt work

BarrelPosition is already a Vector3. I believe the issue is you’re wrapping another around it.

It should be:
Explosion.Position = BarrelPosition

1 Like

Yes, this would be the problem; however, should probably use the barrel’s actual position, rather than its orientation.

Thanks so much this actually worked