Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

bool value or number value?

what is better to use

if script.Parent.[ValueName].Value = 1 then

-- do something end

elseif script.Parent.[ValueName].Value = 2 then

-- do something end [POSSIBLE}END}IDK]

or

use a bool value and do this

what is better to use

if script.Parent.[ValueName].Value = true then

-- do something end

elseif script.Parent.[ValueName].Value = false then

-- do something end [POSSIBLE}END}IDK]

1 comment

0

return but i'm not planing on returning anything i just want to store 3 stats and brick colors

1 answer

Booleans return true or false. Integers return whole numbers.

Booleans are the right choice.

Also, use "==" and not "=". You should use double "=" for conditional statements and one "=" for stuff like changing values of variables/values.

This discussion is preserved as it was. New answers, comments, and votes are closed.