I would like to make a story game which makes it have their username and their profile picture when you click a part, and turns off the collisions and makes the transparency 1. Basically if they click the button it'll make them say something and it will open a GUI. Problem is, I don't know how to make it and there are no videos on it. I've tested the script and it still has not worked.
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 ????

2 comments
Sorry, this script doesn't work and doesn't show me any errors. I will try a different script if there's another answer.
i got it working here: https://www.roblox.com/games/6461075678/game-example-4-dgakt (you will need to edit it)