So I’m making an options system to my game and I want an on the button that changes the text to ‘off’ and the color to red.
But the Gui just turns black when it should be red because I’ve set the color in the script to be red.
I’ve tried
script.Parent.Frame1.ImageColor3 = Color3.new(197, 34, 34)
script.Parent.Frame.ImageColor3 = Color3.new(232, 35, 21)
But this just turns the Gui white.
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.TextButton1.Text = "OFF"
script.Parent.Frame1.ImageColor3 = Color3.new("197, 34, 34")
script.Parent.Frame.ImageColor3 = Color3.new("232, 35, 21")
end)
1 Like
You put the arguments of Color3
as a string
, change it to number
.
script.Parent.Frame1.ImageColor3 = Color3.new(197, 34, 34)
script.Parent.Frame.ImageColor3 = Color3.new(232, 35, 21)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.TextButton1.Text = "OFF"
script.Parent.Frame1.ImageColor3 = Color3.new(197, 34, 34)
script.Parent.Frame.ImageColor3 = Color3.new(232, 35, 21)
end)
script.Parent.Frame1.ImageColor3 = Color3.new(197, 34, 34)? then it just turns white
2 Likes
Yes. Because you put the arguments as a string
, it requires a number
, just remove the speech marks you added.
1 Like
xeavz
(Xea)
#5
Try doing Color3.new(197/255, 34/255, 34/255). Color3.new uses values ranging from 0 to 1 so I think this should work.
3 Likes