script["Menu"].Parent = game.Players.LocalPlayer.PlayerGui
--Locals
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")
--GUI Reference
Gui = game.StarterPlayer.StarterPlayerScripts.EnterGame.Menu
--Makes sure that the player doesn't spawn at the start.
game.Players.CharacterAutoLoads = false
--When the player loads into the game, it shows the GUI
game.Players.PlayerAdded:Connect(function(player)
for _, gui in pairs(StarterGui:GetChildren()) do
gui:Clone().Parent = player:WaitForChild("PlayerGui")
end
game.Players.CharacterAutoLoads = false
Gui.Enabled = true
end)
--Disables GUI when we click
script.Menu.Frame.Enter.MouseButton1Click:Connect(function()
script.Menu.Frame.Visible = false
end)
Hello! I have been trying to add a menu to my game. The problem I originally had was that the main menu wouldn't show due to Character auto loads being off. I solved this by searching it up on the all mighty dev forums. But the next problem was the error in the title: Menu is not a valid member of LocalScript "Players.MyUserName.PlayerScripts.EnterGame" Anyone know where I made my mistake?
(Keep in mind I'm new)
Thanks.

2 comments
nope I did this on purpose, the post I had read advised that was the way to do it. For clarity, I want to make a menu but not have people killed over and over while they are still in the menu.
By "that was the way to do it" I'm assuming you mean that was the way to replicate a GUI to a Player's PlayerGui. While this would technically work, it's of much greater convenience to simply parent the gui under StarterGui.