Dssall2
(Dssall2)
November 23, 2022, 6:13pm
#1
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)
AdSomnum
(kai)
November 23, 2022, 6:42pm
#4
Use this
Close = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("PresentMenu").PresentMenu2.Close
Close.Visible = false
script.Parent.MouseButton1Click:Connect(function()
Close.Visible = true
end)
Dssall2
(Dssall2)
November 23, 2022, 6:46pm
#5
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.
system
(system)
Closed
December 7, 2022, 7:04pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.