Want to stay connected to the Scripting Helpers community and get real-time help? Join the Scripting Helpers Discord Server!
Ad
Log in to vote
0

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

Asked by 3 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 1130 — 3mo

1 answer

Log in to vote
0
Answered by
theCJarmy7 1130
3 months ago
Edited 3 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