I've been making a survival wilderness game that includes a dynamic temperature system (One of the main features) and I know the basic commands in Lua, however, I'm stumped with trying to create the scripts for three things; Hunger, Thirst, and Temperature. They're all three Text Boxes that will simply display things like if the player is warm, nourished, and slaked (Hydrated). I'm keeping the graphics basic for more detailed features so I can prevent lag and have it easier overall but other than knowing basic Lua commands like print, wait, function, local, if/then statements etc. I am stuck with creating the Hunger, Thirst and Temperature system, not even including the Inventory system. Whenever I look for tutorials that ROBLOX provided they have none on specifically creating what I'm needing. Once I'm done with them I can start creating the objects that you can eat/drink and wear/use for the temperature system. Anyways, this is mainly about the scripting so how can I make the three GUI TextBoxes to display different messages to warn the player like (Malnourished, Dehydrated, Freezing, etc.) and eventually begin to injure them until they die? I have the will to code it myself, but I just need to know exactly how can I do this?
How can I script a Hunger/Thirst/Temperature and Inventory System for a Survival game?
1 answer
I would start with 3 guis. Preferably different colours.
You should have Number Values inside the player or character for each stat eg. thirst, health, hunger.
You need a script that runs in a loop, decreasing the number values.
You need another script in the guis, that is triggered if the nuber values change. It Tweens the guis to size depending on the amounts of thirst, health and so on.
Damaging the player is simple. If health is below 10 then :damage(math.random(5,10)) or something.
1 comment
Thanks for clearing things up a bit! For the GUI's, I was making them basic boxes that will display text on how well the Player is. It also warns the player by changing the text to what condition they're in. (Things like Minor and Severe Malnourishment/Dehydration). Severe Malnourishment halves the Player's health and increases Thirst. Dehydration slows the Player's speed and can kill them.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This is scripting helpers, where we fix peoples errors in scripts, not give people scripts for free. If you want to know how to script check out free modeled scripts or go to wiki.roblox.com
I wasn't asking to get this script for free, I was wondering how I can make it. The wiki doesn't tell how one creates a Hunger/Thirst/Temperature system, and free model scripts don't do what YOU want it to do. You have to code it and edit it. The thing is, I don't know how. I wasn't asking to code out an entire script just for me to use, I was wondering -how- I can make something like this.
The wiki, youtube, and other sources teach you Roblox Lua. You don't need a specific tutorial, you just need to learn the language, then you can write whatever you want.