"userdata" as in type(workspace.foo1) what does this phrase mean

Here’s an explanation from the official Lua documentation.


userdata have nothing to do with Players in a game; it’s just what the datatype is called.


Userdata is used to represent datatypes written and stored in C that can be interacted with using Lua/Luau.

For example, an Instance is a datatype created by Roblox used to represent objects in a game. Instances are handled in the engine (C++) with Lua/Luau being a bridge to interact with them. Therefore, it’s a userdata.

Some other examples of userdata include UDim2, Vector2, UDim2, Axes, CFrame, etc.


You can read this thread for more information:

1 Like