Here's the script im using:
local surfacegui = surfguifolder.SurfaceGuiLeft:Clone()
if color then
surfacegui.Frame.BackgroundColor3 = Color3.fromRGB(color)
end
surfacegui.Parent = v2
debris:AddItem(surfacegui,duration)
The color will always turn to 0,0,0. If I print color, it will be a value like: 123,42,243. And if I use 3 numbers instead of the variable, it will work. Whats the issue?

2 comments
You might need to use Color3.fromRGB(color.R, color.G, color.B)
Or simply just surfacegui.Frame.BackgroundColor3 = color