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

Why does a explosion not go into a clone that i made?

I'm making a bomb gear, and when you click it drops a bomb which then explodes. But for some reason the explosion does not exist, which is very weird.

local tool = script.Parent

tool.Activated:Connect(function()
	local clone = tool.Handle:Clone()
	clone.Parent = workspace
	clone.Position = tool.Handle.Position
	clone.CanCollide = true
	wait(3)
	local ex = Instance.new('Explosion')
	ex.Parent = clone
	ex.Position = clone.Position
	ex.BlastRadius = 10
	ex.DestroyJointRadiusPercent = 100
	clone:Destroy()
end)

4 comments

0

oh

0

What?

0

why did you say "oh" ?

0

Yeah lol. Their famous last words were, "oh".

1 answer

✓ Accepted answer

The problem is the part clone destroys before the explosion can even be made.

To fix this, just use wait().

wait(1)
clone:Destroy()

The part will still be visible while it explodes, so if you want it to explode but not be visible, use this:

	clone.Transparency = 1
	wait(3)
	clone:Destroy()

1 comment

0

Tysm!

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