Cant get type annotation to work with array

I would like to have a variable thats a table where the 1 index is a model and the 2 index is a string but no matter what i do it doesnt work

image

i have tried to put the numbers in [1], “1”, [“1”], ive tried no numbers and just have {Model, string} but nothing works, how do i do this?

That’s because Luau doesn’t currently support numbers as literal types
image

Strings do work, you just need to use the type keyword to alias the type

image

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.