I am currently working on a library in roblox, and i have a question i want to check i want to check if the value i put in a function is an array or not? if it's in an array then it will return a true and if it's not it will return a false.
✓ ANSWER ACCEPTED
How to check if the given value is a list/table or not?
1 answer
✓ Accepted answer
type returns type of given value:
local function CheckIfGivenValueIsTableAndIfSoThenReturnTrueElseReturnFalse(Table)
return type(Table) == "table"
end
the types for type are string, number, thread, table, function, nil, userdata and boolean. Roblox has implement it's own version which is typeof, type will return userdata for all of the Roblox Instances and libraries, typeof will return Roblox type name.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thx @imkirda
sob