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

What do I did wrong with this GUI?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

When the player will click the play button ( the text button), the screen Gui, image label and the text button to be invisibles. What do I did wrong?

local function Shy Game.ScreenGui.TextButton.MouseButton1Click = invisible end

Shy(Game.ScreenGui.TextButton.ImageLabel)

What do I did wrong?

0
Do you mean Visible? woodengop 1134 — 10y
0
nope victor52778 0 — 10y

1 answer

Log in to vote
1
Answered by
awfulszn 394 Moderation Voter
10 years ago
Edited 7 years ago

I THINK this is correct, but I am new to LUA so it might not be correct.

01Shy = game.StarterGui.ScreenGui.Shy
02TextButton = game.StarterGui.ScreenGui.TextButton
03ImageLabel = game.StarterGui.ScreenGui.ImageLabel
04PlayButton = game.StarterGui.ScreenGui.PlayButton
05 
06PlayButton.MouseButton1Down:connect(function(open)
07    if Shy.Visible == false then
08        Shy.Visible = true
09        TextButton.Visible = true
10        ImageLabel.Visible = true
11        PlayButton.Visible = true
12    else
13        Shy.Visible = false
14        TextButton.Visible = false
15        ImageLabel.Visible = false
16        PlayButton.Visible = false
17    end
18end)
Ad

Answer this question