I'm storing Colours in a table to be able to call them depending on a random number (1,3)
set up like this,
local Cols = {BrickColor.new("Bright red"),BrickColor.new("Bright yellow"),BrickColor.new("bright blue")}
and I'm calling it like this:
t.BrickColor = Cols[string.sub(thingy, 2)]
t is defined and the string.sub will always produce a number between 1-3 but it keeps throwing up the error: ServerScriptService.GEN R 8:21: bad argument #3 to 'BrickColor' (BrickColor expected, got nil) even though it is supplied. Wat. What am I missing here?

1 comment
string.sub doesn't return a number, it returns a string.