Hello, I need help loading an image for my RPG.
I thought of getting the ID of the player and then connecting that up with a Roblox URL.
However, the image does not show up and shows up:
ContentProvider:PreloadAsync() failed for rbxassetid://99666917
Is there any way to fix this problem?
local player = game.Players.LocalPlayer local charImage = script.Parent charImage.Image = "http://www.roblox.com/asset/?id=" .. player.UserId
The hierchy is that a BackpackScreen is being cloned from ReplicatedStorage to PlayerGui. Then inside the GUI, there is a frame which is named BackpackFrame. Inside BackpackFrame, there are other objects, but I'll say the main one, an image label named CharApperance.
This is not how you would get a character's picture. You'd need to use this. Here is an example to get a picture for a 200x200 image label.
local id = game.Players.LocalPlayer.UserId local image = game.Players:GetUserThumbnailAsync(id, 2, 1) game:GetService('ContentProvider'):PreloadAsync({image})
Keep in mind that :GetUserThumbnailAsync is a yield function.
Hope this helps!