Hello, every part of the script is responding well to eachother except the line where it changes the color to (30, 182, 20) which is a medium-dark green. Every time I run the script, it turns the button completely white, and the background color says (6500, 0, 0).
Player = game.Players.LocalPlayer --get the local player color = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("WhatColor") script.Parent.MouseButton1Up:connect(function() if color.Value == "Green" then script.Parent.BackgroundColor3 = Color3.new(240, 0, 0) color.Value = "Red" script.Parent.Text = "Game Off" Player.Ingame.Value = false elseif color.Value == "Red" then script.Parent.BackgroundColor3 = Color3.new(30, 182, 20) color.Value = "Green" script.Parent.Text = "Game On" Player.Ingame.Value = true end end)
Player = game.Players.LocalPlayer --get the local player color = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("WhatColor") script.Parent.MouseButton1Up:connect(function() if color.Value == "Green" then script.Parent.BackgroundColor3 = Color3.fromRGB(240, 0, 0) color.Value = "Red" script.Parent.Text = "Game Off" Player.Ingame.Value = false elseif color.Value == "Red" then script.Parent.BackgroundColor3 = Color3.fromRGB(30, 182, 20) color.Value = "Green" script.Parent.Text = "Game On" Player.Ingame.Value = true end end)
OR
Player = game.Players.LocalPlayer --get the local player color = script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("WhatColor") script.Parent.MouseButton1Up:connect(function() if color.Value == "Green" then script.Parent.BackgroundColor3 = Color3.new(240/255, 0/255, 0/255) color.Value = "Red" script.Parent.Text = "Game Off" Player.Ingame.Value = false elseif color.Value == "Red" then script.Parent.BackgroundColor3 = Color3.new(30/255, 182/255, 20/255) color.Value = "Green" script.Parent.Text = "Game On" Player.Ingame.Value = true end end)
Either method above works, it gets the exact color value that you specify.