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

How can i insert a value into the headshot image URL?

Hi, I am trying to create a script that displays the headshot picture of the player(that's playing and viewing). this is in a imagelabel and a local script. I wanted to change the UserId= (inside the quotations) to the players ID. How can I tell it to add a value?

script.Parent.ImageLabel.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=&width=420&height=420&format=png"

2 comments

0

Did you accept my answer and then un-accept it?

0

lmao this was over a year ago

1 answer

✓ Accepted answer

Concatenation.

script.Parent.ImageLabel.Image = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. player.UserId .."&width=420&height=420&format=png"

You can insert things into the middle of strings.

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