Whats the best way to handle this name system?

Hey fellow developer, I’m currently trying to create a realistic roleplay name system for my game, but I need to put multiple names into a list via making them buttons but when I do this it doesn’t make buttons for every name (assuming its too big?). Any help would be appreciated.

1 Like

It depends on the situation, but try using a scrolling frame, you can expand the canvas size as much as you want. If that did not work it might be something with the script. Here’s an example of a script that should work.

local num = 1
for i=1, #Names do
local button = Instance.new("TextButton",script.Parent.ScrollingFrame) --assuming you put a scrolling frame
button.Text = Names[num]
num = num + 1
end

Also try adding an UIlistlayout if you did not already, it will put them in order. Read more about UIListlayout here:

Ran into an issue with that one.


Is the Names the name table? if not replace it

local num = 1
for i=1, #yourtable do
local button = Instance.new("TextButton",script.Parent.ScrollingFrame) --assuming you put a scrolling frame
button.Text = yourtable[num]
num = num + 1
end