So here is the script..
01 | local rng = math.random( 1 ,#game.Players:GetChildren()) |
02 | local pl; |
03 | local gui = Blah |
04 | for i,v in pairs (game.Players:GetChildren()) do |
05 | if i = = rng then |
06 | pl = v |
07 | end |
08 | end |
09 |
10 | gui.TextLabel.Text = pl.Name |
11 | gui.ImageLabel.Image = https://www.roblox.com/bust-thumbnail/image? |
12 | userId = ..pl.UserId..&width = 420 &height = 420 &format = png |
13 | userId = ..pl.UserId..&width = 420 &height = 420 &format = png |
Error from output: Players.TrueFalses.PlayerGui.LocalScript:11: Expected identifier when parsing method name, got '/'
Which came from the line :
1 | gui.ImageLabel.Image = https:/< --error/www.roblox.com/bust-thumbnail/image? |
Got marked red.
Please help!
Instead of doing this:
1 | gui.ImageLabel.Image = https://www.roblox.com/bust-thumbnail/image?userId = ..pl.UserId..&width = 420 &height = 420 &format = png |
Do this:
1 | gui.ImageLabel.Image = "https://www.roblox.com/bust-thumbnail/image?userId=" ..pl.UserId.. "&width=420&height=420&format=png" |
You have to add " ".
If this didn't help, comment on my answer what showed up in the output.
Thanks, like this??
local rng=math.random(1,#game.Players:GetChildren()) local pl; local gui= "lol" for i,v in pairs(game.Players:GetChildren()) do if i==rng then pl=v end end
gui.TextLabel.Text=pl.Name gui.ImageLabel.Image = "https://www.roblox.com/bust-thumbnail/image?userId=" ..pl.UserId.."&width=420&height=420&format=png"
for naming the local gui, it only allows me to name it quoted " ", otherwise it becomes an error..