Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What does 'type', and 'typeof', do ingame?

Read the title! Is it difficult or something??? :)

1 answer

✓ Accepted answer

After reading off of devforum and developer.roblox.com, here's what I found.

Type(variable) is the Native Lua version and finds the type of the variable you put in. It can return:

“nil” (a string, not the value nil), “number”, “string”, “boolean”, “table”, “function”, “thread”, and “userdata”.

Typeof(variable) is the Roblox version and can find other Roblox types such as (but not limited to)

"Vector3", "Instance", nil (the value), and normal types like "number" and "string"

Info found in https://devforum.roblox.com/t/new-typeof-global-function/29992 and https://developer.roblox.com/en-us/api-reference/lua-docs/Lua-Globals

This discussion is preserved as it was. New answers, comments, and votes are closed.