Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't my normal Gui disappear? (This is using a LocalScript).

The only thing in the output is "work".

script.Parent.MouseButton1Click:Connect(function()
	print ("work")
	game.StarterGui.ChooseGui.choice1gui.Visible = false
end)

How is this not working?

1 answer

✓ Accepted answer

Hello, please consider this:

script.Parent.MouseButton1Click:Connect(function()
    print ("work")
    game.Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("ChooseGui"):FindFirstChild("choice1gui").Visible = false
end)

Based from my experiences, contents of StarterGui are automatically replicated to PlayerGui upon spawning.

Resource that may help: https://developer.roblox.com/en-us/api-reference/class/PlayerGui

1 comment

0

Thank you, this worked perfectly!

This discussion is preserved as it was. New answers, comments, and votes are closed.