So when there is nothing in the table an event will happen, and all players will be inserted into the table "Ingame"

but it doesent insert into the table

wait()
local Players = game:GetService("Players")
local Ingame = {}
local Outgame = {}
Players = game:GetService("Players")




function added(player3)
	
	table.insert(Ingame, player3.Name)
end
Players.PlayerAdded:Connect(added)

wait(1)

print(unpack(Ingame));

4 comments

0

instead of player3.Name, write 'player3'.

0

still won't work

0

You are using a LocalScript or ServerScript?

0

Server Script