I have a table for all the players that have finished (FinishedPlayers) and a table for all the players in the server (Plrs). I want the event to fire for every player that didn’t finish. What am I doing wrong here.
for _, Plr in next, Plrs do
if type(Plr) ~= FinishedPlayers then
EliminatedTextEvent:FireClient(Plr)
end
wait()
end
local function getArrayDifference(t1, t2)
local t3 = {}
for _, value in ipairs(t1) do
if not table.find(t2, value) then
table.insert(t3, value)
end
end
return t3
end
Just make sure the first argument is the larger of the two arrays (longer).