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

What's wrong with my code that makes a GUI appear?

The script is in a ScreenGui in the player's PlayerGui. ViewPhotos is a TextButton within a Frame(called Frame) that is a child of the ScreenGui. Nothing relevant comes in output and there are no noted errors in the code.

If any more info is needed, please ask!!

button = script.Parent.Main.ViewPhotos

button.MouseButton1Click:connect(function()
script.Parent.Main.ViewPhotos.MouseButton1Up:connect(function(player)
	pcall(function()
		if player.PlayerGui.Desk.ImageLabel.Visible == false then
			player.PlayerGui.Desk.ImageLabel.Visible = true
		else
			player.PlayerGui.Desk.ImageLabel.Visible = false
		end
	end)
end)
end)

1 answer

hope this works~

button = script.Parent.Main.ViewPhotos

button.MouseButton1Up:connect (function()
         script.Parent.Desk.ImageLabel.Visible = not  script.Parent.Desk.ImageLabel.Visible
end)

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