Im getting the error 'R Cant be assigned to'?
Hello,
I wanted to make a automatic rarity system that takes the stringvalue of an item, gets its rarity and then it SHOULD set the background color of the item, but it doesn't because im getting an error.
The script:
01 | local guipart = script.Parent.GuiPart |
02 | local StatsFolder = script.Parent.Stats |
03 | local rarity = StatsFolder.Rarity |
04 | local itemname = StatsFolder.ItemName |
06 | local newRarity = string.upper(rarity.Value) |
07 | local newName = string.upper(itemname.Value) |
09 | print (workspace.RarityColors.Background.COMMON.Value.R * 255 , workspace.RarityColors.Background.COMMON.Value.G * 255 , workspace.RarityColors.Background.COMMON.Value.B * 255 ) |
12 | guipart.ItemInfoGUI.Background.Rarity.Text = newRarity |
13 | guipart.ItemInfoGUI.Background.ItemName.Text = newName |
14 | guipart.ItemInfoGUI.Background.BackgroundColor 3. R = Color 3. new(workspace.RarityColors.Background [ newRarity ] .Value.R * 255 ) |
15 | guipart.ItemInfoGUI.Background.BackgroundColor 3. G = Color 3. new(workspace.RarityColors.Background [ newRarity ] .Value.G * 255 ) |
16 | guipart.ItemInfoGUI.Background.BackgroundColor 3. B = Color 3. new(workspace.RarityColors.Background [ newRarity ] .Value.B * 255 ) |
17 | guipart.ItemInfoGUI.Overline.BackgroundColor 3 = Color 3. new(workspace.RarityColors.Overline [ newRarity ] .Value) |