Changes color when clicked

Hello, I made a spectate GUI but I don’t know how to make it change colours when clicked

For example, when OFF it is red but when ON it is green

script:

local plrs = {}
local Player = game.Players.LocalPlayer
local hiding = false
script.Parent.MouseButton1Click:Connect(function()
	if not hiding then
		hiding = true
		script.Parent.Text = "OFF"
		local player = game.Players:GetChildren()
		for i = 1,#player do
			if player[i].Name ~= Player.Name then
				table.insert(plrs,workspace[player[i].Name])
			end
		end
		for i = 1,#plrs do
			plrs[i].Parent = nil
		end
	elseif hiding then
		hiding = false
		script.Parent.Text = "ON"
		for i = 1,#plrs do
			plrs[i].Parent = workspace
		end
		plrs = {}
	end
	print(unpack(plrs))
end)

Where I placed it
Screen Shot 2022-04-02 at 12.01.42 AM

NEVERMIND I FOUND THE WAY

I ADDED

	script.Parent.Parent.SettingButton.TextColor3 = Color3.fromRGB(255,0,0)

AFTER THE

script.Parent.Text = "OFF"