Gooncreeper
(Gooncreeper)
#1
Hello in functions you can do nice things with arguments for yourselves and others, heres an example:
function test(great_value : boolean)
end
And when typing the function into the editor it shows that the first value should be a boolean.
But, how would I do that with a userdata value?
1 Like
nicemike40
(nicemike40)
#2
You can just use the name of the roblox type, like BasePart
or Player
, instead of boolean
.
Gooncreeper
(Gooncreeper)
#3
I mean like a userdata created with newproxy()
nicemike40
(nicemike40)
#4
I don’t know if that’s currently possible
Are you looking for this?
function foo(bar: any)
if type(bar) == "userdata" then
-- do stuff
end
end
Gooncreeper
(Gooncreeper)
#6
No, just looking for something to make the editor look a bit nicer.