i keep getting this error at this line in my script even tho the display name is a child of plrName: ty!
templateClone.displayName.Text = "@"..p.DisplayName
local template = script.Parent.plrScroll.plrName
local plrs = game:GetService("Players")
function updPlrs()
local plr = game.Players.LocalPlayer
local thumbnailtype = Enum.ThumbnailType.HeadShot
local thumbnailsize = Enum.ThumbnailSize.Size420x420
for i, child in pairs(script.Parent.plrScroll:GetChildren()) do
child:Destroy()
end
for i, p in pairs(game.Players:GetPlayers()) do
local thumbnail = plrs:GetUserThumbnailAsync(p.UserId, thumbnailtype, thumbnailsize)
local templateClone = template:Clone()
templateClone.Parent = script.Parent.plrScroll
templateClone.Visible = true
templateClone.Text = p.Name
templateClone.displayName.Text = "@"..p.DisplayName
templateClone.PFP.Image = thumbnail
end
end
updPlrs()
game.Players.PlayerAdded:Connect(updPlrs)
game.Players.PlayerRemoving:Connect(updPlrs)