I'm working on a custom player list for my game and I need some help with it.
local numberOfSlots = {}
local scrollingFrame = script.Parent
function addSlot(thePlayer)
local Slot = game.ReplicatedStorage.NameFrame:Clone()
Slot.PlayerName.Text = thePlayer.Name
local slotPos = Slot.Position
local slotSize = Slot.Size
Slot.Position = UDim2.new(slotPos.X,slotPos.Y,(slotSize.Y.Scale * #numberOfSlots))
table.insert(numberOfSlots, #numberOfSlots +1)
end
for i,v in pairs (game.Players:GetPlayers()) do
if v:IsA("Player") then
addSlot(v)
end
end
I'm trying to make it so that there's a player block gui for each player, and they're all spaced apart. It's not working very well though. I tried a 2 player server and for player 1, only their name showed up on the playerlist. For player 2, both names showed up but they weren't spaced apart, the name guis were in the same position. No output errors, server side of client side. Help please?

3 comments
I modified your code a bit and ran into some issues. I updated the code in the original question. Basically, all the players show up now, but the frames for each player still stack.
I modified your code a bit and ran into some issues. I updated the code in the original question. Basically, all the players show up now, but the frames for each player still stack.
I've double checked my code but I don't seem to be getting any frames stacking, and if they are I'm not sure why.