I have been working on my shop and added tiers/rarity, so for an easier management of the colors i made a folder with the colors of each tier, here is the script for changing colors:
local Rar = script.Parent
local Image = Rar.Parent.ImageShow
local Colors = script.Parent.Parent.Parent.Parent.Parent.RarityColors
local Rtext = script.Parent.Parent.RarityText
if Rar.Value == 0 then
Image.BackgroundColor3 = Color3.new(Colors.CommonColor.Value)
Rtext.TextColor3 = Color3.new(Colors.CommonColor.Value)
Rtext.Text = "Common"
else if Rar.Value == 100 then
Image.BackgroundColor3 = Color3.new(Colors.StarColor.Value)
Rtext.TextColor3 = Color3.new(Colors.StarColor.Value)
Rtext.Text = "Star!"
I selected an item as Star to test the colors but when i tested the game, the text and the background were black. The Star tier color is like a light yellow. I hope you can help me, thanks.
Don’t use a Color3 constructor. What does Colors refer to, a container full of Color3 value objects? Set the colors of your objects to the raw value of the Color3Value object. For example, BackgroundColor3 of Rarity value 0: