While going through Studio, I found Values, like string value, bool value, int value, and I was wondering how I use them, and why I should use them in scripts.
I was wondering what to use Values for?
2 answers
Hi jack, #General Info
I recommend using values for stats like Sou said. But, not just player stats. If you want to create many moves or swords or weapons in your game, use stats for those to set the damage or any other effects you want them to have. Also, if you're going to have mobs in a game, then values for them would be very important.
#Sneaky Tip
There's also something else that I use values for. This would be the status of a function. I usually use a bool value for this, and I like to know what state something is in. So, if the state is true then that means that something has been activated. This can be pretty useful if I want other things to work around this activation or something along those lines.
#Story Time
The first time I heard about values was when I was playing Sword Burst Online and I came across a game dev that made the swords in that game. I was a curious person back then, and wasn't really into development much. I was slightly interested in it but, always gave up when I worked on Roblox Studio. I asked "How did you make these cool swords have these crazy damages and how did you make this sword anyway?" Then, he replied with "I used values." So, I asked what values were and he gave me a face that was just screaming "Are you serious?" And, ever since then, I've known about the existence of values.
##Hope I helped and have a wonderful day/night.
Thanks,
Best regards,
~~ KingLoneCat
Values can be used for stats. Like... Cash ( IntValue, NumberValue), Ranks(StringValue). BoolValue is mostly used for checking if something is true, or not. Then there are values, that are used for coloring(Color3Value, BrickColorValue) which are storing values, for changing color of objects ( GUI propertes, Parts and another stuff...) The last values are used to store position (CFrameValue, Vector3Value), with them you can change position of parts and another stuff. All of those values can be used for much more, this is only example!
Also there is, ObjectValue,that is holding objects reference. Then there is RayValue which I don't know what is it used for.
They can be also used in conditional statements http://robloxdev.com/articles/Conditional-Statements-in-Lua.
4 comments
Thanks for the example I am starting to understand now.
No problem.
Why was this downgraded?
^ same question I ask
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks for the tips, and what else to use values for, hope you have a great day/night :D