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

Why is the explosion particle in my script not showing up?

I made this script that's supposed to make a wall disappear and show an explosion effect when you click it, the wall disappears but the particle doesn't show up

script.Parent.MouseClick:Connect(function(click)
	local explosion = Instance.new("Explosion")
	explosion.Position = script.Parent.Parent.Position
	script.Parent.Parent:Destroy()
end)

I also put the actual vector 3 position but it still doesn't do anything, can someone tell me what im doing wrong?

1 answer

✓ Accepted answer

This should work (the reason it is not working is because you are not parenting the explosion to the workspace (do it like this)):

script.Parent.MouseClick:Connect(function(click)
    local explosion = Instance.new("Explosion")
    explosion.Parent = game.Workspace
    explosion.Position = script.Parent.Parent.Position
    script.Parent.Parent:Destroy()
end)

2 comments

0

Thanks! this worked. Im assuming you have to add it's parent because the game doesn't know where the explosion should go right?

0

Exactly

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