So I made a script which changes the colour scheme for two GUI's when a button is pressed. It prints the random colour numbers but does not visually change the colour. Any help?
colorgui = script.Parent.ColorChange
function colorChange()
local MessageGui = script.Parent.MessageGui
MessageGui.BackgroundColor3 = Color3.new(math.random(300), math.random(300), math.random(300))
print(MessageGui.BackgroundColor3) --DEBUG
colorgui.BackgroundColor3 = MessageGui.BackgroundColor3
end
colorgui.MouseButton1Down:connect(colorChange)

3 comments
Thanks! I'm not exactly great at this yet. :P
Actually, Color3 is only between 0 and 1, and the two arguments in math.random aren't needed. math.random(1, 10) is the same as math.random(10)
Really? Thanks!