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

i’ve been trying to become a more technical coder as of recently and i’ve noticed the following
and yes i know what a instance is

local Ex1,Ex2 = type(workspace.foo1),typeof(workspace.foo1)
print(Ex1,Ex2)

– Ex1 is outputted as “userdata” for it’s type
–Ex2 is outputted as “Instance” for it’s type which i am familiar with

but the term userdata i have no clue to as why this is outputted or even why it’s called userdata this is a part why does it come out as “userdata” i find this strange because the parts in a game have nothing to do with the user unless it’s a building game so the name is odd.

i might be over analyzing this possibly I’m sure you guys could help me understand this Term

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

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