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

How to make a gui button appear and disappear?

Hello, I am very confused, I made a GUI button that teleports the player to a certain location, and it worked. But I then wanted to get rid of the button right after you clicked so you can't click again. So im asking how I could do this so I could get this working. Thanks!

EDIT: Here is my code

bin = script.Parent

Part = game.Players.LocalPlayer.Character

function onClick()
	game.Lighting.GameArea.TextButton.Visible = false 
    if Part:FindFirstChild("Torso") then 
        Part.Torso.CFrame = CFrame.new(Vector3.new(50, 200, 410))
		
    end
end




-Jack

1 comment

0

Help! Please.

2 answers

Add this to it. (Make sure it is changing the right value of the correct gui.)

script.Parent.Visible = false

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