My appear GUI script is not working

Hello, my appear GUI script is not working, can anyone help me?
I’ve gone through the process of trying to fix it many times. But here is my code.

game.Players.LocalPlayer.PlayerGUI.MainGUI.Intro.Play.MouseButton1Click:connect(function()

game.StarterGui.MainGUI.TopStatus.Visible = true

end)

3 Likes

Maybe try doing

game.Players.LocalPlayer.PlayerGui.MainGUI.TopStatus.Visible = true

1 Like

Make sure this is a LocalScript on the client. I recommend using script.Parent…MouseButton1Down, and Visible.
If you send a picture of the way your GUI looks in the explorer, I’ll send you a script that should do what you want

script.Parent.Name.MouseButton1Down:Connect(function() -- make this reference the button
script.Parent.Frame.Visible = true; -- make this reference your frame
end)

Don’t forget, this must be in a local script, preferably in the GUI its self.

1 Like

Also, make sure it’s in a local script. I agree with sloss, try doing script.Parent instead of referencing it that way. It’s easier and errors are more easily detectable.

It is a local script, but let me try using script.parent and moving the script.

1 Like

Indeed. If that doesn’t work, you are referencing it wrong. Check your output bar as well.

It did not work and it says this in the output box.

MouseButton1Click is not a valid member of TextLabel

1 Like

Well, that’s because textlabel’s don’t support clicks.

You can change this by changing a textlabel to a textbutton.
You can only use mouseEnter for textlabels.

textlabel.MouseEnter:Connect(function() – I think it’s mouseEnter, may be mouseHoverEnter, I’ve forgotten lol.

Instead of doing that you may want to do

“name of your textbutton here”.MouseButton1Click:Connect(function()
– code here –
end)

I will go ahead and try those edits.

1 Like

The whole point of this code though is to click a text button and then a text label appears.

1 Like

Okay so, what you need to do in that case is

"name of textbutton".MouseButton1Click:Connect(function()
Position of textlabel here + name.Visible = true
end)

This should work. Make sure to use game.Players.LocalPlayer.PlayerGU “Position of textlabel” (reference playergui) and then say.Visible = true.

How should I reference playergui in that statement?

Well, you just have to do game.Players.LocalPlayer.PlayerGUI.Position of your gui in screenGUI.

If you give me the exact locations of the textbuttons in the StarterGUI, I can help you with the script.

So in my script I have a TextButton on {0.499, 0},{0.65, 0} (Thats the one were clicking) and then the text label to appear at {0, 0},{0.01, 0}

1 Like

No no no… LOL not the UDMI2 positions, I meant referencing where they are. For example. game.Workspace.Part1.
Should have made it more specific tbf.

The MouseButton1Down event fires when the user presses their left Mouse button down on the GUI object.

If you are looking for an event requiring the user to press and RELEASE their left mouse on a GUI in order for the event to fire, consider using GuiButton.MouseButton1Click .

From what i noticed, the “MouseButton1Down” wants you to HOLD the left mouse button for it to fire.

It’s up to personal preference.

1 Like

Ok the position for the text button is game.StarterGui.MainGUI.Intro
And for the label its game.StarterGui.MainGUI

1 Like