What am i doing wrong? when i press the button nothing happen
local close = script.Parent.Parent.X
close.MouseButton1Click:Connect(function()
print("entrado")
game.StarterGui.ChooseMenu.Enabled = false
end)
What am i doing wrong? when i press the button nothing happen
local close = script.Parent.Parent.X
close.MouseButton1Click:Connect(function()
print("entrado")
game.StarterGui.ChooseMenu.Enabled = false
end)
You don’t change anything in StarterGui, you have to reference the local gui itself.
local close = script.Parent
close.MouseButton1Click:Connect(function()
print("entrado")
script.Parent.Parent.Parent.Parent.Parent.Enabled = false
end)
You want to change the PlayerGui, not StarterGui. When a player joins, everything in the StarterGui is Cloned to the PlayerGui.
local close = script.Parent.Parent.X
local player = game.Players.LocalPlayer
close.MouseButton1Click:Connect(function()
print("entrado")
player.PlayerGui.ChooseMenu.Enabled = false
end)
And how i do that?
Oh I had no idea !! many thanks
No problem, everyone makes that mistake in the beginning!
Still no working! isn’t working help D:
local close = script.Parent.Parent.X
local player = game.Players.LocalPlayer
close.MouseButton1Click:Connect(function()
print("print 1")
player.PlayerGuiChooseMenu.Enabled = false
print("print 2")
end)
Lol my bad, I had a typo. Try it again now.
player.PlayerGui.ChooseMenu.Enabled = false
There’s a typo. Add a period in that third line from the end between PlayerGui and ChooseMenu
Now it works!! Thank you very much: D