Hello,
I’m working on adding players names and images on a admin Gui. Now I decided to use for i, v in pairs()
and I wanted to get the children of holder.
I can but I can’t get only 1 holder (Admin1) and thats the only one thats works
Code
LocalScript
No errors in output.
for i, Admin in pairs(AdminProfiles:GetChildren()) do
if Admin:IsA("Frame") then
for i, Profile in pairs(Admin:GetChildren()) do
if Admin.Name == "Admin1" then
if Profile:IsA("ImageLabel") then
Profile.Image = Players:GetUserThumbnailAsync(1507646970, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48)
elseif Profile:IsA("TextLabel") then
Profile.Text = Players:GetNameFromUserIdAsync(1507646970)
end
elseif Profile.Name == "Admin2" then
if Profile:IsA("ImageLabel") then
Profile.Image = Players:GetUserThumbnailAsync(339310190, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size48x48)
elseif Profile:IsA("TextLabel") then
Profile.Text = Players:GetNameFromUserIdAsync(339310190)
end
end
end
end
end
*I removed some of the code because it repeats elseif
but with different names