Current code:
local Players = game:GetService("Players") local plrName = Players.LocalPlayer.Character.Name local image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=420&y=420&username=" .. plrName local textButton = script.Parent.ClickDetector -- Change to directory of the textButton local imageLabel = game.Players.LocalPlayer.PlayerGui.someonetouchedit.ImageLabel -- Change to directory of the image label function onClicked() imageLabel.Image = image game.Players.LocalPlayer.PlayerGui.someonetouchedit.PlrName.Text = plrName end textButton.MouseButton1Click:connect(onClicked)
Please don't judge me on my scripting, I'm kind of bad ????
Maybe this would work.
Did not have the time to test as im currently on phone :/
local Players = game:service('Players') local plrName = Players.LocalPlayer.Name -- character is the name of their character. you can simply get the name from the player themself local image = Players:GetUserThumbnailAsync(Players.LocalPlayer.UserId,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size420x420) local textButton = script.Parent.ClickDetector -- Change to directory of the textButton local imageLabel = game.Players.LocalPlayer.PlayerGui.someonetouchedit.ImageLabel -- Change to directory of the image label function onClicked() imageLabel.Image = image game.Players.LocalPlayer.PlayerGui.someonetouchedit.PlrName.Text = plrName end textButton.MouseButton1Click:connect(onClicked)
You also need to use a local script if you are going to use LocalPlayer.