Help with Player list inside a gui

So i’m trying to make some sort of booking system for a race thing. When someone books I want a gui to update on all players booking gui on a scrolling frame giving the profile icon, name and rank (what racing class).

I’ve only gotten to the point where i try to make the frame from a local script. I think im doing a lot wrong, that’s why I need help.

Local Script:

local function playerField(name, userid, rank)
	local PlayerField = Instance.new("Frame")
	PlayerField.Name = "PlayerField"
	PlayerField.Size = UDim2.new(1.0267316, 0, 0.1053711, 0)
	PlayerField.BackgroundTransparency = 1
	PlayerField.Position = UDim2.new(0, 0, 1.e-07, 0)
	PlayerField.BorderSizePixel = 0
	PlayerField.BackgroundColor3 = Color3.fromRGB(140, 148, 255)

	local ImageLabel = Instance.new("ImageLabel")
	ImageLabel.Size = UDim2.new(0.153, 0, 1, 0)
	ImageLabel.BackgroundTransparency = 1
	ImageLabel.Position = UDim2.new(0.0582751, 0, 0, 0)
	ImageLabel.BorderSizePixel = 0
	ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
	ImageLabel.Parent = PlayerField

	local userId = userid
	local thumbType = Enum.ThumbnailType.HeadShot
	local thumbSize = Enum.ThumbnailSize.Size100x100
	local content, isReady = game.Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)

	ImageLabel.Image = content

	local UICorner = Instance.new("UICorner")
	UICorner.CornerRadius = UDim.new(1, 0)
	UICorner.Parent = ImageLabel

	local Plr = Instance.new("TextLabel")
	Plr.Name = "Plr"
	Plr.Visible = true
	Plr.Size = UDim2.new(0.7590185, 0, 0.4169877, 0)
	Plr.BackgroundTransparency = 1
	Plr.Position = UDim2.new(0.2386506, 0, 0.0457579, 0)
	Plr.BorderSizePixel = 0
	Plr.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
	Plr.FontSize = Enum.FontSize.Size14
	Plr.TextSize = 14
	Plr.TextColor3 = Color3.fromRGB(255, 255, 255)
	Plr.Text = name
	Plr.TextWrap = true
	Plr.Font = Enum.Font.GothamBlack
	Plr.TextWrapped = true
	Plr.TextXAlignment = Enum.TextXAlignment.Left
	Plr.TextScaled = true
	Plr.Parent = PlayerField

	local Rank = Instance.new("TextLabel")
	Rank.Name = "Rank"
	Rank.Visible = true
	Rank.Size = UDim2.new(0.7590185, 0, 0.4169877, 0)
	Rank.BackgroundTransparency = 1
	Rank.Position = UDim2.new(0.2386506, 0, 0.5185894, 0)
	Rank.BorderSizePixel = 0
	Rank.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
	Rank.FontSize = Enum.FontSize.Size14
	Rank.TextSize = 14
	Rank.TextColor3 = Color3.fromRGB(255, 255, 255)
	Rank.Text = rank
	Rank.TextWrap = true
	Rank.Font = Enum.Font.GothamBlack
	Rank.TextWrapped = true
	Rank.TextXAlignment = Enum.TextXAlignment.Left
	Rank.TextScaled = true
	Rank.Parent = PlayerField
end

local function reload()
	for _, v in pairs(Players:GetChildren()) do
		playerField(v.Name, #StartingFrame.BookedList:GetChildren(), "FREQUENT")
	end
end

wait(10)
reload()

I get no error, but I don’t know anymore?
Please help.

Can you try to explain what’s happening/what’s wrong. “I think im doing a lot wrong, that’s why I need help” is not a lot to go off of.

I mean it’s not creating the frame, I get no errors at all. I’m trying to get the frame creator to work before I move on to :FireAllClients() or something.

Alright, so I think I found the issue myself. I was just not thinking straight. Alright thank you.

1 Like