I want to make it so if someone joins the game it will detect that they joined the game and then it will make a new variable in a table? and when someone leaves the game their variable gets deleted?
You can use Players.PlayersAdded and Players.PlayerRemoving
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) print(player.Name .. " joined the game!") end) Players.PlayerRemoving:Connect(function(player) print(player.Name .. " left the game!") end)
Hope it help!