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?

2 comments
Upon inputing this script, I was given this "attempt to concatenate local 'B' (a nil value)"
You need to declare what "R, "G", "B" are. So local R = "R", local G = "G", local B = "B", that's the first issue, now you need to declare what PWidth, and PHeight are.