So in my game, there is a script but it gives me this warning
My script says explosion is only in enclosing function; consider changing it to local?
What should I do?
Heres a piece of the script
function blowUp()
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1
sound:play()
explosion = Instance.new("Explosion") -- here is the part where it gives the warning
explosion.BlastRadius = 6
explosion.BlastPressure = 10000000
I am hoping that someone could answer my question.

1 comment
It isn't an error. It's a warning which tells you to add "local" before "explosion"