How to change color3 property

I’m trying to change the color of a selection box.

However, the property itself is a Color3 so I don’t know how to change it.

I have already tried using all sorts of methods including:

	PreviewBlock.SelectionBox.Color3.Value = Color3.fromRGB("255, 0, 0")

but none of them would work, it keeps saying:

fromRGB is not a valid member of TextButton “Players.YellowBannana898.PlayerGui.ScreenGui.ColorPalette.Color3”

I have tried asking friends and searching on this forum for similar questions but found nothing, if someone could help I’d really appreciate it!


Two things:

  1. PreviewBlock.SelectionBox.Color3 --you have “.Value” which needs to be removed
  2. Color3.fromRGB(255,0,0) --you have quotation marks that need to be removed

I tried without the .Value and it still didn’t work, as for the quotation marks, I’ll try that out.


I tried it, it didn’t work!

Looking at the error message, I have a question, did you ever defined Color3 as a local variable at some point?

1 Like

No? It’s a reference to it’s property.

I’m not talking about the property, I’m talking about the global datatype one, the one you use to create new Color3 values because according to error, it’s a textbutton instead of global datatype.

A text button? No it’s supposed to be a Selection Box.

Okay so let’s think for a second shall we? This script is normally supposed to work but it doesn’t:

PreviewBlock.SelectionBox.Color3 = Color3.fromRGB(255, 0, 0)

because script throws error saying “fromRGB is not a valid member of TextButton” which means Color3 in Color3.fromRGB(255, 0, 0) statement is a TextButton and script is throwing error because there is no function named fromRGB on textbuttons. So you must’ve redefined the Color3 global at some point.

1 Like

You were right! I defined a variable with the name Color3 without even remembering it! Sorry, for wasting your time!