You cannot detect when variables are changed, regardless if it’s a table or not.
Whenever you want to add something to a table in the script, you can run the function directly after.
Example:
local plrs = {}
local function tableUpdated(t, value)
print(value .. " was just added to a table!")
end
game.Players.PlayerAdded:Connect(function(plr)
plrs[plr.Name] = plr
tableUpdated(plrs, plrs[plr.Name])
end)
While this is useless as you can do game.Players:GetPlayers() this is just an example.
Also, make sure to read the posting guidelines for #help-and-feedback:scripting-support (here)