Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a decal of your own avatar?

I'm making a game with an inventory and I want a little decal which should look exactly like the person currently vieuwing that decal. Something like an avatar of yourself that changes if you change. Is there any possible way to do this? Any help is appreciated. :)

2 comments

0

Regarding your comment on my answer, the picture doesn't change because the server has to update the picture to match the avatar on the site. Unfortunately, that's as far as we can get scripting-wise, so you'll have to stick with it. Sorry

0

Ok, thx anyway, I learned something new. :)

1 answer

✓ Accepted answer

Make sure to make an attempt and post some code next time you ask for help.

Besides that, here's what you need:

"http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username="

You can use this in a script like so with an ImageButton, ImageLabel, or any other picture displaying instances.

Note: "object" should be the instance you're changing the image of (Decal, ImageButton, etc.)

For GUIs:

object.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=" .. game.Players.LocalPlayer.Name -- You can change this to anything, like a variable

For Decals and/or Textures:

object.Texture = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=" .. game.Players.LocalPlayer.Name -- You can change this to anything, like a variable

If there are any errors I'd be happy to help you debug them.

1 comment

0

Thanks a lot! I used this script and it displays your avatar, but when I change clothing (In Game) the avatar doesn't change. This is probably because the picture you are getting is from roblox, not from the game itself. Is there a way you could do this?

This discussion is preserved as it was. New answers, comments, and votes are closed.