I want to function as: If a coolant is on, the temp goes down until it reaches the temp of 0. Instead, for example, if the text = 200, it puts it to 0 upon running the script. Any help?
if workspace.TVCOOL.Part.SurfaceGui.STATUS.Text == 'ON' then
while true do workspace.TVTEMP.Part.SurfaceGui.Temp.Text = workspace.TVTEMP.Part.SurfaceGui.Temp.Text - 1
if workspace.TVTEMP.Part.SurfaceGui.Temp.Text == '0' then break
end
end
end

3 comments
I'm not that experienced of a scripter, let me know of any of my mistakes.
first of all why is there no "wait" in your infinite loop that can causes the game to freeze up
second of all i suggest using number values for temperatures then have the text set its text as the number value