I am trying to make a script that shows the current avatar of the player, but everytime i try to set the image for the imagelabel, it doesn't load at all.
This is the code i am using to set the image:
local frame = Instance.new("ImageLabel",gui) local player = game.Players.LocalPlayer frame.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..player.Name
The code is inside a LocalScript inside a gui.
Is there anything i'm missing? Any help is appreciated, thank you.
The reason you are having trouble is that you defined the frame as an image, not as an image frame. Here is the correct code.
local image = Instance.new.ImageLabel image.AbsolutePosition.OffSet = {5,5}{1,0} image.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..player.Name