Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a gui button appear and disappear?

Asked by 10 years ago

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

0
Help! Please. JackJG1 0 — 10y

2 answers

Log in to vote
0
Answered by
v3c3 0
10 years ago

Add your code so people can edit it.

Ad
Log in to vote
0
Answered by 10 years ago

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

script.Parent.Visible = false

Answer this question