Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What's the difference between 'type' and 'typeof'?

Asked by
acid392 11
5 years ago

What's the difference between 'type' and 'typeof'?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

type is a Lua function and returns whether something is a booleon, a number, a string, a function, a CFunction, a userdata, a table, or nil. typeof is part of the Roblox API and does the same thing, except it recognizes Roblox userdatas (such as a Player or Part) as types as well and returns their type name rather than simply "userdata".

0
Thanks man, i needed this too lol gloveshun 119 — 5y
0
np davidgingerich 603 — 5y
0
thanks dude, I appreciate it acid392 11 — 5y
Ad

Answer this question