Issues with .toHSV()

I have a script here:

local h, s, v = (Color3.toHSV(, 255, 255))) 
print(h, s, v)

h returns as 0.5 while s and v both return as nil.
Is this an error or is it an something I’m mising?
Any help would be appreciated.

1 Like

Have you tried without the extra parentheses? You don’t need one around the whole statement.

1 Like

Somehow that worked! I guess I didn’t pick that up when writing the code. It’s pretty messy, I should clean it up.

In Lua, wrapping something in parenthesis will ignore the rest of its values.

local tbl = {1,2,3}
print(table.unpack(tbl)) --1   2   3
print((table.unpack(tbl))) --1

Similar things happen if following the values by a comma too so be aware of both situations

print(table.unpack(tbl), table.unpack(tbl)) --1   1   2   3