Styling a Scrollingframe

So the following code is producing a new instance of textlabel and imagelabel. However, it does not create a image label. Could someone point to the issue and perhaps send me some links how I can style it together? Would making a template and cloning it be easier to style as opposed to creating a new instance?

local Players = game:GetService(“Players”)

local frame = script.Parent

local function create_player_gui(plr)

if frame:FindFirstChild(plr.Name) then return end

print("Making Gui for "..plr.Name)

local name = Instance.new("TextLabel")

name.TextSize = 24

name.Font = 'SourceSansBold'

name.BackgroundTransparency = 1

name.TextXAlignment = Enum.TextXAlignment.Left

name.Size = UDim2.new(1, 0, 0, name.TextSize)

name.Text = plr.Name

name.TextColor3 = Color3.new(0.658824, 0.694118, 0.00784314)

name.Name = plr.Name

name.Parent = frame

end

Players.PlayerAdded:Connect(function(plr)

create_player_gui(plr)

end)

for _, player in pairs(Players:GetPlayers()) do

create_player_gui(player)

end

Output

As far as I can see, there is no code for the ImageLabel.

Whoops here it is.

local Players = game:GetService("Players")
local frame = script.Parent

local function create_player_gui(plr)
	if frame:FindFirstChild(plr.Name) then return end
	print("Making Gui for "..plr.Name)
	local name = Instance.new("TextLabel")
	name.TextSize = 24
	name.Font = 'SourceSansBold'
	name.BackgroundTransparency = 1
	name.TextXAlignment = Enum.TextXAlignment.Left
	name.Size = UDim2.new(1, 0, 0, name.TextSize)
	name.Text = plr.Name
	name.TextColor3 = Color3.new(0.658824, 0.694118, 0.00784314)
	name.Name = plr.Name
	name.Parent = frame
	local thumbnail = Instance.new("ImageLabel")
	thumbnail.Image = "rbxassetid://6647793794"
	thumbnail.Size = UDim2.new(0, 86, 0, 86)
	thumbnail.Parent = frame
	Instance.new("UIScale", thumbnail).Scale = thumbnail

end

Players.PlayerAdded:Connect(function(plr)
	create_player_gui(plr)
end)
Players.PlayerRemoving:Connect(function(plr)
	create_player_gui(plr)
end)

for _, player in pairs(Players:GetPlayers()) do
	create_player_gui(player)
end

The size would be the scale of the UIScale under the imagelabel. You need to set the scale of it to 1 (or something higher) instead of the default 0.

Could you reexplain, don’t I already have it scaled higher then 1?

With this, I don’t know why because I don’t do this, but it scales to 0 automatically.

While I see what you’re trying to accomplish I do recommend using a template scrolling frame. Whenever I do work with GUIs with different styles, I always use a template frame as it’s personally easier for me. So in conclusion I recommend trying to use a template as you won’t experience these types of problems especially with scaling.