Robloxtype() function

So, we have type() which takes a lua data type and turns it into a string:

> print(type("hi"))
> print(type(1))
> print(type(true))
> print(type(nil))
> print(type(function() end))
> print(type(game))
> print(type(

but what about those userdatas? There are a few of them, like Object, Vector3, CFrame, BrickColor, UDim. It would be great to get a function that would tell us what type they are.

I have a tool to make roller coaster tracks, and it uses a BrickColorValue to tell the script what color it should use. Here’s the problem: there’s no really good way to tell when the BrickColorValue is being used and when it has a BrickColor written in instead. type() doesn’t discern between a BrickColor and Object, they’re both userdata to it. Using pcall() to determine is the only way, and that’s terrible.

If you’re requesting this because you need it now, I made what you’re requesting about a month ago:

It supports every data type listed on this page.

Buddy let me know that wasn’t open-source. Oops. It’s public now.