Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

BackgroundColor3 not working?

Ok, so I have tried changing the line of code a ton load of times if you would like to review my code this is just part of a large script I am making.

   local GUI = Instance.new("ScreenGui")
      GUI.Parent = user.PlayerGui
      lab = Instance.new("TextLabel")
      lab.Size = UDim2.new(0, 200, 0, 100)
      lab.Position = UDim2.new(0, 20, 0, 20)
      lab.BorderSizePixel = 2
      lab.BackgroundTransparency = 0.5
      lab.BackgroundColor3 = Color3.new(27,42,53)
      lab.Font = "SourceSansBold"
      lab.FontSize = "Size14"
      lab.TextColor = BrickColor.new("Green")
      lab.Text = "You now own a tycoon!"
      lab.Parent = GUI
      wait(5)
      GUI:remove()

1 answer

✓ Accepted answer

Color3 has a range from 0 -1 so we divide the r,g,b by 255

lab.BackgroundColor3 = Color3.new(27/255,42/255,53/255)

This discussion is preserved as it was. New answers, comments, and votes are closed.