Whenever i try to make a frame i dont get the exact color!
Any help?
local Gui = Instance.new("ScreenGui", Player.PlayerGui) local Frame = Instance.new("Frame", Gui) Frame.BackgroundTransparency = 0.3 Frame.BackgroundColor3 = Color3.new(170, 85, 255) Frame.BorderSizePixel = 0 Frame.Size = UDim2.new(0, 1298,0, 1298)
When using Color3, all of the 3 values must be a number between 0 and 1, to get the exact color you want you will have to use color/255. This is the code you should use:
local Gui = Instance.new("ScreenGui", Player.PlayerGui) local Frame = Instance.new("Frame", Gui) Frame.BackgroundTransparency = 0.3 Frame.BackgroundColor3 = Color3.new(170/255, 85/255, 255/255) Frame.BorderSizePixel = 0 Frame.Size = UDim2.new(0, 1298,0, 1298)
I'm guessing it always came up as being white. I think Color3 values used to work as numbers up to 255 but now need to be between 0 and 1. If this worked or helped you, please vote up and accept as answer!
look, idontcare2004 already answwerd your question, but you are using the Size wrong.
Offset is a terrible feature! Use scale.
Frame.Size = UDim2.new(1, 0, 1, 0)
learn how to use scale.
I usually make a function to help me with Color3 as I feel it saves time and makes the code a whole lot easier.
Here's the function
function color3(r, g, b) return Color3.new(r/255, g/255, b/255) end local Gui = Instance.new("ScreenGui", Player.PlayerGui) local Frame = Instance.new("Frame", Gui) Frame.BackgroundTransparency = 0.3 Frame.BackgroundColor3 = color3(170, 85, 255) Frame.BorderSizePixel = 0 Frame.Size = UDim2.new(0, 1298, 0, 1298)