How do I use String/BrickColor/Color3Values?

  1. What do you want to achieve? knowing how to use them not explained how to used them, I just want to know how to really use them because I am not seeing how it’s useful to use them without know why it’s at least important to use them

  2. What solutions have you tried so far? I tried youtube but none of them explain how to use it in scripts really, look at the pictures here


yes the UI looks nice and clean but, it doesn’t work at the moment as I need to code it but, that’s not the point here.

But how do you really use the string value and the other 2 as I said, Don’t link me to any YouTube videos as I found none of them helpful with what I’m looking for, if the values are used in a different way tell me because I want to if it’s used for something or something else thank you.

Please do not ask people to write entire scripts or design entire systems for you.

If you mean the values you can create in the explore then this is how.
All types of those values are used in the same way the ony difference is what values they can store e.x stringValue stores a string and a BrickColorValue stores a BrickColor.

Creating values through scripts:
to create these values you need to use Instance.new("objectName", parent)
the objectName is there because Instance.new is used to make more than just values
the parent is what the object(the value) is child of e.x parent = workspace means that the parent of the value is the workspace

the second way of making is doing it manually

Setting and getting their value through scripts:
to get or set a value you first need to know the path to the object e.x workspcae.stringValue
then you need to use .Value because you need to tell roblox that you want to do something with the Value of it
to set the value you need to do workspace.stringValue.Value = value
to get a value from it you need to do workspace.stringValue.Value

one important thing to remember is to set the right valueType in it. Some cases it makes an error in others it does not. One common error of wrong value is NumberValue into stringValue which doesn’t make an erorr also another thing to remember is that you allways need .Value after it if you forget it you’ll get errors trying to set or get the value

If there’s something you don’t understand just ask

I assuming you are using brickcolors for your color picker.

You don’t have to use extra variables for grabbing BrickColor name and RGB value, you can simply use BrickColor.Name for grabbing name and BrickColor.Color for grabbing RGB color.

An example:

local button = path_to_button

local BColor = BrickColor.new(button.BackgroundColor3) -- this will return closest brick color from RGB value

button.MouseButton1Clicked:Connect(function()

    script.Parent.Text = BColor.Name

    script.Parent.BackgroundColor3 = BColor.Color

end)

all of these values are what we would call a data type. they all have their own unique characteristics. you see the specifics on the wiki