User Selection Menu

Hey guys, I want to create a user selection menu, but I don’t really know how. (See specifics)

I want a script that when run, creates a TextButton for every user in the server with their name inside of a scrolling menu

If there is any possible way to do this, please share.

Hey!

I think that there is a way to do that.

Start by looping through every player in the server. You can easily do it like this.

local Players = game:GetService("Players")

local ScrollingFrame = PATH_TO_SCROLLING_FRAME_HERE

for i, player in pairs(Players:GetPlayers()) do
  -- Add code
end

Next, we need to create the TextButton. Add the following code in the ( – Add code ) area in the last code I gave.

local TextButton = Instance.new("TextButton", ScrollingFrame)
TextButton.Name = player.Name
TextButton.Text = player.Name
TextButton.Parent = ScrollingFrame

And that should be it! Enjoy!

If there are any issues, please tell me.

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