I have a script that plays a sound every time you scroll. There's also a script that allows you to turn off the sound. If the script is disabled, the button turns red, but if the script isn't disabled, it should turn blue. Although it just turns white. Here's the script:
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.ScrollSound.Disabled == false then
script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.ScrollSound.Disabled = true
script.Parent.Text = "Scroll Sound Effect: OFF"
script.Parent.BackgroundColor3 = Color3.new(255, 0, 0)
elseif script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.ScrollSound.Disabled == true then
script.Parent.Parent.Parent.Parent.Parent.PlayerScripts.ScrollSound.Disabled = false
script.Parent.Text = "Scroll Sound Effect: ON"
script.Parent.BackgroundColor3 = Color3.new(20, 141, 255)
end
end)

3 comments
im sorry but this kinda hurts to read
Use Color3.fromRGB(100,100,100) or divide your values by 255
^^ just view source