Hello. So I am trying to make a custom Player Leaderboard. I am not very good at scripting, but I thought I knew what I was doing. However, after finishing the script, it will not work. The template duplicates correctly into the displayframe, but the values like the player’s name and image wont update. I am kind of confused and have already looked over the script multiple times. I think I might be stupid because I am clearly missing something. Below are the images.
can you show the Output? because I am also very confused with this
idk if this works or not but try it
local PlayerImage = game.Players:GetUserThumbnailAsync(plr.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
local display = plr.DisplayName
TemplateClose.DisplayName.Text = Display.."<font size=\"7\"> <font color=\"#A5A5A5\"> @"..Name.."</font> </font>"
TemplateClose.PlayerFrame.Characterimage.image = PlayerImage
Nah it still doesn’t work It didn’t update
hmmm wait i will try it again …
If you are tampering with the StarterGUI, players wont see change until you reset. It must use the playergui to show changes instantly for every player.
I am pretty sure it is using the PlayerGUI
I see, is there nothing in the output?
It is because the script is literally inside of the screen gui :/
The script goes into playerGui once the game starts and then runs from there
Try adding
local Players = game:GetService("Players")
at the top of your script and replace all game.Players
with just Players
(It may or may not work, but it makes your code cleaner)
exactly, the script is running in the playergui, nto the startergui. but for the actual point i have no idea whats going on. maybe you can add a “print()” statement around your code which assigns the player name.
I tried that. It printed my name and everything correctly. It just doesnt update to the text.
wait… in your code it says “Template.Parent = ListDisplay”. shouldnt it be
“TemplateClone.Parent = ListDisplay”?
i think the problem is that youre setting the parent of the template to the leaderboard, NOT the template clone. try replacing Template.Parent = ListDisplay
with TemplateClone.Parent = ListDisplay
There we go lol. Thanks I cant believe I missed that!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.