How to make a roblox autocomplete?

Hi there ! I need help and got some questions on how to make a lua autocomplete like this:


Any message may help !

Are you talking about just the autocomplete part, or the whole editor? Your title and description are conflicting.

it’s a bit both haha, but I think the autocomplete is the part I can’t understand right now

1 Like

I mean it depends on how complex we’re talking. If you mean basic barebones autocomplete, you can have a list of symbols (all the globals and variables in that scope) which you update each time you query it, and then based on the current sequence of characters at the end, you can create a table of any symbols that match that sequence of characters at the beginning.
Then, you send that off to wherever you handle the UI, which would have a frame (preferably scrolling frame) with a UIListLayout to the right of the cursor, and it will create a new frame for each auto-completable symbol… you get the gist.
You can track which one the user selects with the arrow keys/mouse, and then when tab is pressed, just insert the remaining characters of the selected symbol at the cursor.

I’m open to help with anything else!

1 Like

I will try this thank you ! For now I make you the solution of this post xd

1 Like

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