My issue: I can't seem to get this script to actually apply the unpacked table to the TextLabel at the end of the script. There are no warnings or errors in the output.
What it's supposed to do: This script is supposed to get all of the people who aren't in the group and display them on the InfoScreen
What I've tried:
- I've put various prints throughout the script (beginning, allplayers before changes, allplayers after changes, and the end) and they all printed successfully
- I have put an if statement in the end to check if the table was nil before actually applying it to the TextLabel
local Players = game:GetService("Players")
local text = script.Parent:WaitForChild("People").Text
Players.PlayerAdded:Connect(function(player)
local allplayers = game.Players:GetChildren()
print(unpack(allplayers))
for i=1,#allplayers do
if allplayers[i]:IsInGroup(1) then
table.remove(allplayers,i)
end
end
text = unpack(allplayers)
end)
