Hey. I'm currently working on a PlayerList with all the names of all players in the game. I want to display them on a part but something isn't working. It works fine with a ScreenGUI but I must display it on a SurfaceGUI and that's the problem. It's not showing up on the SurfaceGUI and I don't know why.
local BoardList = game:GetService("ReplicatedStorage"):WaitForChild("BoardList")
local holder = script.Parent:WaitForChild("holder")
local function add(player)
local new = BoardList:Clone()
new.name.Text = player.Name
if not new.name.TextFits then
new.name.TextScaled = true
end
new.Position = UDim2.new(0, 190, 0 + (.103 * #holder:GetChildren()), 0)
new.Parent = holder
end
add(game.Players.LocalPlayer)
game.Players.PlayerAdded:Connect(function(player)
add(player)
end)

6 comments
Are you getting any errors in your code?
Nope. I sadly get nothing.
Do the players need to interact with this gui in any way or is it just listing the players in the server?
Yeah, you got a point there Lonely. (;
Don't know why you deleted your answer, it was still good code. I was just saying another way to do it if he doesn't need users to click on players
It wasn't what he was looking for, so I thought It would be better if I left it out to not confuse anybody