Ad
Log in to vote
0

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

Asked by 6 months 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 1257 — 6mo

1 answer

Log in to vote
0
Answered by
theCJarmy7 1257 Moderation Voter
6 months ago
Edited 6 months 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