Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I was wondering what to use Values for?

Asked by 5 years ago

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.

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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

0
Thanks for the tips, and what else to use values for, hope you have a great day/night :D jack33887 9 — 5y
Ad
Log in to vote
-1
Answered by
Sougood -10
5 years ago
Edited 5 years ago

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.

0
Thanks for the example I am starting to understand now. jack33887 9 — 5y
0
No problem. Sougood -10 — 5y
0
Why was this downgraded? mixgingengerina10 223 — 5y
0
^ same question I ask Rare_tendo 3000 — 5y

Answer this question