How can i get the name of a function's parameter?

So, right now i was thinking about implementing tips for my command bar.

I searched for a while and couldn’t find anything about this on the forum. Then i searched outside of it, however lua’s debug.getinfo() is different from luau’s debug.info().

image

All i want to achieve, is a way to obtain all the parameters of a function, is this possible in luau?

I don’t believe you can, not with luau’s debug.info. The best you can do is get the name of the function.

I’ll see if I can try achieve something like this using metatables and sandboxing the function to somehow get its parameters through a metamethod.

2 Likes

Alright then, thank you for the help.

1 Like

The answer is no. You cannot get the name of any function’s parameter.

I made a script on the command bar that solved my issue. (i used script.Source and the string library)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.