Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make it to show the player's picture BUT only for him/herself?

Asked by 6 years ago
User = game.Players.LocalPlayer.Name
script.PaintingObj.Value.Texture = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=".. User

I'm trying to make it so the player's picture shows up on a part BUT only for that player.

E.g, PlayerA joins a game and there is a picture of PlayerA on a part, then PlayerB joins and like PlayerA, a picture of PlayerB appears on the same part. But on PlayerA's screen, the image of PlayerA is still the same.

What I'm doing is probably wrong because it only shows up with a picture of the N/A symbol. What I'm trying to get is something like this: http://t5.rbxcdn.com/60c464762542f3cb4bd5f0072c6fc559 - the picture of my user profile. So how do I make it so it redirects to a link like that?

0
you'll need to use a Billboard GUI in the part Paldi 109 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You'll put a billboard GUI in StarterGUI. Then, you'll find the adornee property of it and attach it to the part. As it's in StarterGUI, it'll replicate to PlayerGUI, meaning each player has a seperate billboard.

Hopefully, you'll know how to add an image into it and size it correctly.

You'll then just put a local script inside the image.

local id = game.Players.LocalPlayer.UserId
script.Parent.Image = "https://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&userid=" .. id .. "&cb=" .. tick()

Hopefully, the cache block (&cb=) should stop it from turning up grey. It turns grey as the avatar doesn't sit around waiting to be used. It only appears when someone requests for it.

Thanks,

Explosion

0
It is not working! I have the adornee set to my part. Inside my part is a surface gui that has a image label then inside that is your localscript. The billboardGUI just replaced the surfacegui. MrWafflesNBacon -1 — 6y
0
Ah yes, I just messed up. I meant you should put a SurfaceGUI in StarterGUI with those instructions, not the BillboardGUI. Sorry! ZeExplosion 210 — 6y
Ad

Answer this question