Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Explosion not changing position idk why?

I have this simple code.

local ex = Instance.new("Explosion",script.Parent:WaitForChild("Handle"))
	ex.Position = Vector3.new(script.Parent.Handle.Position)
	print(ex.Position)

For some reason it won't change the explosion position to my desired. And when printed it just prints: "0,0,0". How do I change the position of that explosion?

Ty

1 comment

0

You must set the parent to workspace. ex.Parent = workspace then click down to the nest line and type ex.position = Vector3.new (Put position in here)

1 answer

✓ Accepted answer

That happened to me. I think how I got it to work was by doing that:

local ex = Instance.new("Explosion",script.Parent:WaitForChild("Handle"))
local ab = script.Parent.Handle.Position
ex.Position = Vector3.new(ab.x, ab.y, ab.z)
print(ex.Position)

1 comment

0

Fixed it! Tysm mate.

This discussion is preserved as it was. New answers, comments, and votes are closed.