So I have a "Number Value" inside a brick and every 5 seconds I want it to add 1 to the current value. Here is what I have so far.
local Pos = script.Parent.Position
local C = script.Parent.C
if C.Value <= 5 then
game.Soundscape.Bomb:Play()
E = Instance.new("Explosion", script.Parent)
E.BlastRadius = 190
E.BlastPressure = 50000
E.DestroyJointRadiusPercent = 100
E.Position = Vector3.new(Pos)
else return end
for i=1,5 do
wait(5)
C.Value +1
wait()
end

1 comment
What is this script's purpose? Is it when the value of C is equal to '5', an explosion occurs? Because if you set up the conditional to 'C.Value <= 5', then anything that's below 5 will run the 'if' statement, making your 'for' loop quite useless.