Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I get a player's image onto a part using a GUI?

I'm trying to make a fallen screen from the hunger games, but whenever I try to use it nothing happens. (Filtering Enabled)

local clicker = script.Parent.ClickDetector

local fallen = workspace.Fallen
local screen = workspace.FallenScreen
local fallenimage = workspace.FallenScreen.Decal

local gui = game.StarterGui.ScreenGui
local username = gui.User

local guiclicker = gui.Confirm

username.MouseButton1Click:Connect(function()
fallenimage = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..username
end

Thanks if you can help.

2 comments

2 answers

Day late, but basically you need to define the Local Player, as greatneil80 mentioned in his comment.

This could easily be done by changing username to something like username = Players.LocalPlayer.Username which will work locally, because it is for a script on a GUI, which should be a local script.

This should be able to pull the image you desire, and work locally without any issues.

1 comment

0

I'll give it a try

This discussion is preserved as it was. New answers, comments, and votes are closed.