I've got a full-screen GUI and a GUI where you can choose colours to change the background to. I want to make the texts on screen change as well, but theres a long list of them so I tried to make an array. I'm new to scripting and especially tables, so I don't know what I'm doing wrong or how to make this script work. Can someone please help and take a look?
local background = script.Parent.Parent.Parent.Parent.ScreenGui.Frame local text = {script.Parent.Parent.Parent.Parent.ScreenGui.Frame.Generate,script.Parent.Parent.Parent.Parent.ScreenGui.Frame.Sentence,script.Parent.Parent.Parent.Parent.Shop.Shop,script.Parent.Parent.Parent.Parent.CustomPhrases.Phrases,script.Parent.Parent.Parent.Parent.Colours.Menu} script.Parent.MouseButton1Click:connect(function() background.BackgroundColor3 = Color3.fromRGB(177, 0, 0) text.TextColor3 = Color3.fromRGB(0, 0, 0) end)
Basically, the script only changes the background colour and not the text
And yes I know it probably isn't the most efficient way by listing script.Parent a bunch, but I'm learning and starting with screen GUIs so please be understanding!