Im just getting this error all the time :
Players.Player1.PlayerGui.Menu.Menu.Start Game.Start Game.Click:9: bad argument #1 to 'insert' (table expected, got nil)
here is the script
function EndMenu() wait() local frame = script.Parent.Parent.Parent local play = script.Parent for i , v in pairs(game.Players:GetPlayers()) do wait(0.5) if v then table.insert(_G.gameplayers,v.Name) end frame.Visible = false end end script.Parent.MouseButton1Down:connect(EndMenu)
I want that if u click the Textbutton you willö be added to the Table _G.gameplayers