How would I go about having a button for each player?

Hello, I am making a admin panel for my game. I don’t want to use a open-sourced admin system because I want this game to be a learning experience for me.
Anyway, to the question.
I am wanting to add buttons with all the players on it.
Here is a picture to make it more clear.
I’m wanting a button for each player. The button will say the players name. If you tap on that button, it would bring you to that player.
If you could help, that would be great!

1 Like

I’d recommend looking at this: Players | Roblox Creator Documentation

You could make a local script to add the buttons for every player and then send a request to the server to teleport to a selected player.

1 Like

You would need to use GetPlayers(), then you would need to clone the frame that has the text into the scrollingframe and in the script, you would need to change the PlayerName Text’s text to the plr’s name

local Players = game:GeService("Players")
local PlrFrame = -- The example frame here
local ScrollingFrame == -- Scrolling Frame
for index, value in pairs(Players:GetPlayers()) do
   local PlrFrameClone = PlrFrame:Clone()
   PlrFrameClone.Parent = ScrollingFrame
   PlrFrameClone.PlrName.Text = value.Name -- value is the plr

To bring the player, you would need to change the target’s humanoidrootpart CFrame “Not yours” to your humanoidrootpart’s CFrame

1 Like

Yep, I like to use :MoveTo. I think that’s easier in my opinion. Thanks!

Thank you! It really helped.

blah blah

Alright, no problem, althought I think MoveTo Is slower, but I can’t guarantee.

1 Like