I’m curious on how I can use my current script to add and subtract the supposed value inside a GUI, in this case, being in the sunlight adds a value to the GUI, maxxing at 100, while being in the shade subtracts, minimum being 0.
Add a value for the current Sunlight you have, add a rate for how much you gain while being in the sun, and add a rate for how much you lose while not being in the sun. You can use math.clamp to keep the value at 0 minimum and 100 maximum.
This is really vague, how do I add the mentioned rate to the script? and what value