I have a script that shows a player's CharacterAppearance that repeats every second. Here's the script (the script is inside an ImageLabel):
local plr = game.Players.LocalPlayer repeat wait() until plr while wait(1) do script.Parent.Image = plr.CharacterAppearance end
The problem is that the picture of the character doesn't show up. The output says:
"...Failed to resolve texture format"
So, how do I correctly get a character's appearance into an ImageLabel?
Well, you're using the wrong string. You can use
http://www.roblox.com/Thumbs/Avatar.ashx?username=whyOmustOitObeOme
or
http://www.roblox.com/Thumbs/Avatar.ashx?userid=4330521
Those are the official links for character appearance.
In my script, I do: CharImage='http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username=%s';
, which enables me to format pictures for players.
To fully fix your script:
local Player = game:service('Players').LocalPlayer local characterImageFormat='http://www.roblox.com/Thumbs/Avatar.ashx?x=352&y=352&format=png&userid=%d'; -- repeat wait() until plr --// No point. :( while wait(1) do script.Parent.Image = characterImageFormat:format(Player.userId); end
Sorry, but I don't think you can. A character's appearance isn't even a file. If it was, it would be an obj. file most likely. I see what you're trying to do. Here's my best shot:
script.Parent.Image = "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..plyr.Name