I'm trying to create a script that upon the explosion hitting a SEPARATE brick, an entire model would go from being transparent and CanCollide = false to opaque and CanCollide = true. Here's my current code:
local explosive = game.Workspace.explosive
local rigged = false
function unScrambleAtoms()
ladder = game.Workspace.ladder
ladder.Transparency = 0
ladder.CanCollide = true
end
function explosionAct()
if rigged == false then
rigged = true
wait(5)
local explosion = Instance.new("Explosion")
explosion.Parent = script.Parent
explosion.Hit:connect(unScrambleAtoms())
end
end
while rigged == false do
explosionAct()
wait()
end
It seemed correct in my head... (I thought of it when I was at school then wrote it down)
Any help?

1 comment
I am so confused as to what this does. The while rigged == false do is pointless, and why is the function named unScrambleAtoms...?