This is the part of the script I'm having trouble with. Variables R, G, and B take player input.
local R local G local B local RGB = R..","..G..","..B print(RGB) local P = Instance.new('Frame') P.Name = 'MenuBackground'..PWidth..PHeight P.Size = UDim2.new(0,1,0,1) P.Position = UDim2.new(0,PWidth,0,PHeight) repeat wait() P.BackgroundColor3 = Color3.fromRGB(tonumber(RGB)) until P.BackgroundColor3 == Color3.fromRGB(tonumber(RGB)) print(P.BackgroundColor3) P.Parent = Surface P.BorderSizePixel = 0
If you've noticed, I put print before and after it applies the Color3.fromRGB. Output verifies that RGB is not a blank value and it DOES give out a complete string - ex. 168,255,131 - however the script doesn't seem to apply the RGB Value even if I've set it to repeat the task until it actually holds the Color3 value. Despite this, the second print output always says 0,0,0 and the GUI's background is always just black. I've been trying to solve this problem for three days and I'm at wits end. Is this an error on ROBLOX/Studio's side?
Declare what each local letter is, just like below.
local R = "R" local G = "G" local B = "B" local RGB = R..","..G..","..B print(RGB) local P = Instance.new('Frame', WhereYouWantTheFrame) P.Name = 'MenuBackground'..PWidth..PHeight --[[ I don't know if you've declared what PWidth, and PHeight are, but if not, you need to declare what those are --]] P.Size = UDim2.new(0,1,0,1) P.Position = UDim2.new(0,PWidth,0,PHeight) repeat wait() P.BackgroundColor3 = Color3.fromRGB(tonumber(RGB)) until P.BackgroundColor3 == Color3.fromRGB(tonumber(RGB)) print(P.BackgroundColor3) P.Parent = Surface P.BorderSizePixel = 0
To make it simpler, I did a small test and made a blank place with only the baseplate in it. I put a SurfaceGui in the baseplate, and a Frame in the SurfaceGui. The new Frame's BackgroundColor3 is white before I apply the following script:
local SampleString = "155,212,0" script.Parent.SurfaceGui.Frame.BackgroundColor3 = Color3.fromRGB(tonumber(SampleString))
However, instead of changing the frame's BackgroundColor3 to an actual Color, it changes to black... The same happens even without tonumber()
script.Parent.SurfaceGui.Frame.BackgroundColor3 = Color3.fromRGB(SampleString)
You could try this experiment for yourself with the above conditions and code I've supplied. I'm starting to suspect this might be an error in Studio.