How do I break this while loop, and run a seperate line of code for when coretemp equals 8999?
So the problem is, if I implement the Meltdown Code I know it's going to constantly run infinitely, and I don't want that. So how can I make it only run once, while I have a while loop present?
01 | coretemp = script.Parent.coretemp |
02 | heatmult = script.Parent.heatmult |
03 | coolmult = script.Parent.coolmult |
11 | function heatgeneration() |
13 | if heatmult.Value > coolmult.Value then |
14 | coretemp.Value = coretemp.Value + 1 * heatmult.Value |
15 | elseif coolmult.Value > heatmult.Value then |
16 | coretemp.Value = coretemp.Value - 1 * coolmult.Value |
21 | if heatmult.Value ~ = coolmult.Value then |
24 | script.Parent.Name = "Core Temp: " ..coretemp.Value.. "c, " ..corestatus |
25 | print (script.Parent.Name) |
26 | if coretemp.Value > = 8999 then |
31 | if corestatus = = "DANGER" then |
32 | script.Parent.Core.Size = Vector 3. new( 15.75 , 15.75 , 15.75 ) |
33 | script.Parent.Shield.Size = Vector 3. new( 16 , 16 , 16 ) |
35 | script.Parent.Core.Size = Vector 3. new( 3.75 , 3.75 , 3.75 ) |
36 | script.Parent.Shield.Size = Vector 3. new( 4 , 4 , 4 ) |