I'm making a light mode setting and it keeps turning everything all white when the background isnt supposed to be white! Please help!

local player = game.Players.LocalPlayer
local settingsFolder = player:WaitForChild("SettingsFolder")

function lightMode()
	--FrameColours
	script.Parent.FameBar.FameBarFrame.BackgroundColor3 = Color3.new(135,135,135)
	script.Parent.StatsGui.Coins.BackgroundColor3 = Color3.new(135,135,135)
	script.Parent.StatsGui.Photos.BackgroundColor3 = Color3.new(135,135,135)
	script.Parent.StatsGui.Restarts.BackgroundColor3 = Color3.new(135,135,135)
	script.Parent.SettingsUI.SettingsFrame.BackgroundColor3 = Color3.new(135,135,135)
	
	--TextColours
	script.Parent.FameBar.FameBarFrame.Number.TextColor3 = Color3.new(210,210,210)
	script.Parent.StatsGui.Coins.Amount.TextColor3 = Color3.new(210,210,210)
	script.Parent.StatsGui.Photos.Amount.TextColor3 = Color3.new(210,210,210)
	script.Parent.StatsGui.Restarts.Amount.TextColor3 = Color3.new(210,210,210)
	script.Parent.SettingsUI.SettingsFrame.SettingsLABEL.TextColor3 = Color3.new(210,210,210)
	script.Parent.SettingsUI.SettingsFrame.LightModeLABEL.TextColor3 = Color3.new(210,210,210)
	--button
	script.Parent.SettingsUI.SettingsFrame.LightModeBUTTON.TextColor3 = Color3.new(0,255,0)
	script.Parent.SettingsUI.SettingsFrame.LightModeBUTTON.Text = "ON"
end

function darkMode()
	--FrameColours
	script.Parent.FameBar.FameBarFrame.BackgroundColor3 = Color3.new(80,80,80)
	script.Parent.StatsGui.Coins.BackgroundColor3 = Color3.new(80,80,80)
	script.Parent.StatsGui.Photos.BackgroundColor3 = Color3.new(80,80,80)
	script.Parent.StatsGui.Restarts.BackgroundColor3 = Color3.new(80,80,80)
	script.Parent.SettingsUI.SettingsFrame.BackgroundColor3 = Color3.new(80,80,80)
	
	--TextColours
	script.Parent.FameBar.FameBarFrame.Number.TextColor3 = Color3.new(255,255,255)
	script.Parent.StatsGui.Coins.Amount.TextColor3 = Color3.new(255,255,255)
	script.Parent.StatsGui.Photos.Amount.TextColor3 = Color3.new(255,255,255)
	script.Parent.StatsGui.Restarts.Amount.TextColor3 = Color3.new(255,255,255)
	script.Parent.SettingsUI.SettingsFrame.SettingsLABEL.TextColor3 = Color3.new(255,255,255)
	script.Parent.SettingsUI.SettingsFrame.LightModeLABEL.TextColor3 = Color3.new(255,255,255)
	--button
	script.Parent.SettingsUI.SettingsFrame.LightModeBUTTON.TextColor3 = Color3.new(255,0,0)
	script.Parent.SettingsUI.SettingsFrame.LightModeBUTTON.Text = "OFF"
end

while wait() do
	if settingsFolder.LightMode.Value == true then
		lightMode()
	elseif settingsFolder.LightMode.Value == false then
		darkMode()
	end
end

2 comments

0

sup dude

0

I know this question is solved but to shorten your script you can hold Color3 values in a variable (e.g local WhiteColor = Color3.new(255, 255, 255)