Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Explosion not changing position idk why?

Asked by 6 years ago

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

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) ToxicHero8801 5 — 6y

1 answer

Log in to vote
0
Answered by
Kegani 31
6 years ago

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)
0
Fixed it! Tysm mate. wilsonsilva007 373 — 6y
Ad

Answer this question