I want to know whether I should use
type(variable)
or
typeof(variable)
I want to know whether I should use
type(variable)
or
typeof(variable)
typeof
accounts for Roblox DataTypes, while type
does not (it only accounts for regular Lua DataTypes and vector):
print(type(CFrame)) --> prints "userdata"
print(typeof(CFrame)) --> prints "CFrame"
type()
returns the LUA type of an object, being a number, string, variable, table, function, etc…
typeof()
returns what type does and as well as the Roblox class name for Roblox specific types.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.