Hello,
So when I am running this function. The script is supposed to get a random player's headshot. Should be quite simple, although this is my first timing using player-images, and it doesn't seem to work! I'm not sure what I am doing wrong.
This is my script, everything works fine when running the function, but the image won't load, Why does the request fail?
function PlayerTextAni()
local p = Players:GetPlayers()
local selected_value = math.random(1,#p)
local UserId = p[selected_value].Name
local GuiType = PlayerText
local GuiText = Text
GuiType.Frame.Player.Image = "https://www.roblox.com/headshot-thumbnail/image?username="..(UserId).."48103520&width=420&height=420&format=png"
GuiType.Frame.Visible = true
for i = 1, #GuiText do
GuiType.Frame.Frame.Text.Text = string.sub(GuiText, 1, i)
TextSound:Play()
wait(0.05)
end
wait(2)
GuiType.Frame.Frame.Text.Text = ""
GuiType.Frame.Visible = false
end
Thanks for helping, Simon.

2 comments
Thank you very much!
Np