How do I detect what DataType a variable is? As in:
"Hello world" -- string
0x78443fce95753a3f -- thread
Color3.fromRGB(69,4,20) -- Color3
UDim2.fromScale(0.5,1) -- UDim2
Vector3.FromAxis(Enum.Axis.X) -- Vector3
And so on and so forth.
How do I detect what DataType a variable is? As in:
"Hello world" -- string
0x78443fce95753a3f -- thread
Color3.fromRGB(69,4,20) -- Color3
UDim2.fromScale(0.5,1) -- UDim2
Vector3.FromAxis(Enum.Axis.X) -- Vector3
And so on and so forth.
You can use the typeof() method which is built-in.
Here you can learn about this
What does type and typeof functions do? - Help and Feedback / Scripting Support - DevForum | Roblox
Type() vs typeof()? - Help and Feedback / Scripting Support - DevForum | Roblox
local s = 'a'
print(typeof(s)) -- string
Edit - Sorry I am not really being able to find the link to the Dev-Wiki which gives the documentation about these methods and I hope someone else links it on this thread.
I have linked some previous topics which discuss about them.
A year late but thanks for linking the creator pages ig