The menu won't open

Good afternoon, so I have a very strange problem here. I have done a lot of menus (opening with a script) but this is the first time such a bug, in the picture you can see the script and output. The problem is that when I click on the icon to which the script is attached, then


the output print is displayed and “Close” is not turned off.

StarterGui is not where the player’s gui is located. It’s actually located in the Player’s PlayerGui. Try using the code below.

Close = game:GetService("Players").LocalPlayer.PresentMenu.PresentMenu2.Close

Close.Visible = false

script.Parent.MouseButton1Click:Connect(function()
Close.Visible = true
end)

It shows an error:

Use this

Close = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("PresentMenu").PresentMenu2.Close

Close.Visible = false

script.Parent.MouseButton1Click:Connect(function()
Close.Visible = true
end)

Thank you! Everything works! Thank! Thank! Thank! Thank!

1 Like

Yes, that was my bad. I forgot to put “PlayerGui” after LocalPlayer. Sorry about that.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.