Images of players not showing up

Using the script below, most user images doesn’t show up in my gui at all.
They just turn grey.


https://www.roblox.com/games/337448601/Admin-commands-test#!/game-instances
Idk why it happends, but it happends a lot.

script.Parent.Parent.Parent.Parent.Parent["UI-CENTER"]["Page Content"]["UserSearch"]["Frame"].Thumbnail.Image = "https://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&username=".. script.Parent.Parent.NameInput.Text

@Siekiera

Could this be because the team is working on a fix of the decal issue?

1 Like

I don’t see why it’s filed as a bug. There is another API that gives you the source image and a boool whether or not it’s loaded, but it’s doing exactly what it is supposed to do.

Now a feature to see if it is loaded or not would be awesome.

The reason i filled it as a bug is because “nikolai001” hasn’t changed his profile for over 24 hours.
Yet he shows up as “grey” image.

But the suggestion was good to :slight_smile:

Avatars are not rendered immediately. They’re only rendered when they’re requested. So because you requested an image of the avatar that hasn’t been rendered before, it’ll show up as ‘N/A’ while Roblox’s back-end creates a rendered image. If you tried to request it again after a few seconds, it should show up.

Try putting &cb=(tick()) or something at the end of the url to request a new image.

Sadly i re tried after 30 min, but same issue, but apperently it just showed up in studio atleast.

btw do you mean like this?

https://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&username= &cb=(tick())

"https://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&userid=" .. PlayerUserId .. "&cb=" .. tick()

Like that. CB stands for cache blocker. It’s also recommended to use their UserId instead of their username.

3 Likes

I want the user be able to search using name.
Because users normally don’t have ID in game.
They just know the username of someone.
But maybe have a option to put the ID in tthe search aswell and transform it into username would be a good idea.

Check this out:

But if you already have the username then you may as well use that in the link, up to you I suppose

Not sure if you’re game is enabled for Xbox or not, but one gotcha that comes up is that on Xbox we have to identify users by their Xbox Live Gamertag, and we set the player.Name property to this gamertag. This will likely not be the same as their Roblox name. So if you plan to enable your game on Xbox, it’s advised to use their UserId. A Roblox users UserId will be the same across any platform.

Ok thanks, it’s currently using player.name, and it will be a admin gui, that will be required, so it will be used on several games.
And proabebly some games that works with xbox.
So i’ll convert it to use user ID