Recently, I'm make some test script that I have to compare some values. But I forgot to add .Value
at the end of IntValue
(because I bad at scripting :c ), so the output show this error:
Can't compare userdata with number
The error make me have a little confusing at first, because IntValue
is a object that hold integer value, that mean the output should show like this:
Can't compare an OBJECT with number
I really don't know anything about this, so hope you guys can help me.
Thank :D
In Lua, there are 8 basic types: Nil, boolean, string, function, userdata, thread and table
.
Roblox spins off Lua into their own version, Roblox Lua. The objects you see in the explorer are custom and not part of standard Lua, therefore it's a Userdata because they are added by Roblox.
Hope this answered your question!