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

Click a "start" button and the current gui will disappear and be replaced by a new 1?

Asked by 7 years ago

So basicly im trying to make it so that once i click a button the button will disappear and a new button will appear my script currently is

wait(1) player = game.Players.LocalPlayer button = script.Parent

function teleappear() game.StarterGui.TeleScreenGuiByZen.TextButton.Visible = false wait(0.1) game.StarterGui.TeleScreenGuiByZen.ZensTeleButtonByZen.Visible = true end

button.MouseButton1Click:connect (teleappear)

it doesnt work can someone help me please

0
USE THE GOD DAMN CODE BLOCK farrizbb 465 — 7y

1 answer

Log in to vote
0
Answered by
Wiscript 622 Moderation Voter
7 years ago

Hi there,

You went wrong on a couple of things. What you're doing with the script is you're disabling the GUI in the StarterGui, which will not affect your player, but instead other players that join the game.

Also, you don't need the wait(0.1) in between, unless the effect you're attempting to create must have it. If you want it instantly, it's okay to remove it.

I have remade your script, and I hope it helps. If it does, make sure to press "Accept answer" in the button down below.

button.MouseButton1Click:connect(function()
    player.PlayerGui.TeleScreenGuiByZen.TextButton.Visible = false
    wait(0.1) -- It is not necessary, unless you truely want the delay.
    player.PlayerGui.TeleScreenGuiByZen.ZensTeleButtonByZen.Visible = true
end)

Thanks, Rodrigo455

0
thanks it helps alot Ssj4Gokhan10 14 — 7y
0
If it does, please accept my answer :/ Wiscript 622 — 7y
0
Yea sorry bout that i needed to go eat lunch Ssj4Gokhan10 14 — 7y
Ad

Answer this question