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

ScreenGui is not a valid member of PlayersGui, help please?

So i have been working on a GUI then i converted it to LUA by using GUI to LUA Converter, and i added a "Close" Button. But when i click Button it says this "ScreenGui is not a valid member of PlayersGui" Here is the script of the close button converted

	script.Parent.MouseButton1Click:Connect(function()
		game.Players.LocalPlayer.PlayerGui.ScreenGui.MainFrame.Visible = false
	end)
end

1 comment

0

Does your GUI have anything in it named ScreenGui?

1 answer

✓ Accepted answer

I'm quite new to scripting so I may be wrong

If you use

game.StarterGui.ScreenGui.MainFrame.Visible = false

I think that might work

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