Hi, recently I was trying to tween GUI color by Color3.FromRGB()
for a shop. I put a dictionary which has Colors but I can’t get it.
Error:
Script:
local categoriesColors = {
["Effects"] = {CellBackground = Color3.fromRGB(0,113,0), ShopBackground = Color3.fromRGB(0,27,0), Other = Color3.fromRGB(0,245,0)};
["GamePasses"] = {CellBackground = Color3.fromRGB(170,0,127), ShopBackground = Color3.fromRGB(38,0,54), Other = Color3.fromRGB(183,0,255)};
["Items"] = {CellBackground = Color3.fromRGB(0,0,255), ShopBackground = Color3.fromRGB(0,17,52), Other = Color3.fromRGB(245,0,0)};
["Trails"] = {CellBackground = Color3.fromRGB(234,74,0), ShopBackground = Color3.fromRGB(49,0,0), Other = Color3.fromRGB(0,85,255)};
}
for _, categ in pairs(shopCategories:GetChildren()) do
categ.MouseButton1Click:Connect(function()
--Change Shop Colors--
local tweenItemShowcase = tweenService:Create(shopGUI.ItemInfo.ItemShowcase, TI, {BackgroundColor3 = categoriesColors[categ].Other})
local tweenTextLabel = tweenService:Create(shopGUI.ItemInfo.TextLabel, TI, {BackgroundColor3 = categoriesColors[categ].Other})
local tweenItemsFrame = tweenService:Create(shopGUI.ItemsFrame, TI, {BackgroundColor3 = categoriesColors[categ].Other})
local tweenShopBackGround = tweenService:Create(shopGUI.ShopBackground, TI, {ImageColor3 = categoriesColors[categ].Other})
tweenItemShowcase:Play()
tweenTextLabel:Play()
tweenItemsFrame:Play()
tweenShopBackGround:Play()
--Set Categories' Items--
setCateItems(categ)
end)
end
print(categoriesColors["Effects"].Other)
I printed I tried to make sure it returns me what I am expected and results made me more confused