The methods are written very strangely. For example:
function colorE.new(R:number,G:number,B:number)
local color = {}
setmetatable(color, colorE)
if typeof(R) == "Color3" then
color.R = R.R
color.G = R.G
color.B = R.B
color.color = R
elseif typeof(R) == "number" then
color.R = R
color.G = G
color.B = B
color.color = Color3.new(R,G,B)
elseif typeof(R) == "Vector3" then
color.R = R.X
color.G = R.Y
color.B = R.Z
color.color = Color3.new(R.X,R.Y,R.Z)
else
return error("Color input is not valid!") -- Throw an error if it isn't a color
end
return color
end
The constructor’s type analysis only displays R, G, and B as numbers, however the script shows that R can also be a Vector3 and Color3.
I get that this is probably meant to be an overload function, but the type analysis should be written like this:
function colorE.new(R: number | Vector3 | Color3, G: number?, B: number?)
This should be the case for the other methods as well