EOASTUDIO
(EOASTUDIO)
April 12, 2022, 7:56am
#1
Why does this script not work?
I’m making a menu where it changes the theme of the GUI’s.
My script: (Local script)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.BackgroundColor3 = "255, 255, 255"
script.Parent.Parent.Parent.BackgroundColor3 = "255, 255, 255"
script.Parent.Parent.Parent.Parent.BackgroundColor3 = "255, 255, 255"
script.Parent.Parent.Parent.Parent:FindFirstChild("SettingsFrame").BackgroundColor3 = "255, 255, 255"
end)
venstnly
(ven)
April 12, 2022, 8:18am
#2
you should be doing this instead:
Color3.fromRGB(255, 255, 255)
EOASTUDIO
(EOASTUDIO)
April 12, 2022, 8:23am
#3
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.BackgroundColor3 = Color3.fromRBG(255, 255, 255)
script.Parent.Parent.Parent.BackgroundColor3 = Color3.fromRBG(255, 255, 255)
script.Parent.Parent.Parent.Parent.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
script.Parent.Parent.Parent.Parent:FindFirstChild("SettingsFrame").BackgroundColor3 = Color3.fromRBG(255, 255, 255)
end)
Like this?
Color3.fromRGB
not Color3.RBG
venstnly
(ven)
April 12, 2022, 8:26am
#5
it’s RGB, not RBG
spelling mistake aside, yes it’s correct
Qinrir
(Quin)
April 12, 2022, 8:30am
#6
local parentframe = -- path to the first frame in the UI
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(parentframe:GetDescendants()) do
v.BackgrouncColor3 = Color3.fromRGB(255,255,255)
end
end)