What I am trying to achieve is a temperature screen displaying the current temperature of an object, the temperature is displayed in kelvin and since kelvin does not go below 0 I have to prevent the intvalue from going under 0, so I added a server script as a child to the intvalue. (These are stored in the workspace, grouped in a folder)
The main issue with this may be the code, so that’s why I’m posting this here to maybe get a more efficient way or solve an error with the current code.
I have tried looking for a different method, or looking on other dev forums, anything I found didn’t work as intended.
In case this is helpful at all I will include the code that was used for displaying the temperature on the screen.
Also mentioning that the temperature goes up in an i loop with a random increment.
I don’t think you need a script to make sure an IntValue stays within limits; There’s a new instance type called an IntConstrainedValue, which lets you set the upper and lower bounds, and it will automatically keep it between them.