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

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

Asked by 6 years ago

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"
0
Did you accept my answer and then un-accept it? theCJarmy7 1293 — 6y
0
lmao this was over a year ago theCJarmy7 1293 — 5y

1 answer

Log in to vote
0
Answered by
theCJarmy7 1293 Moderation Voter
6 years ago
Edited 6 years ago

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.

Ad

Answer this question