Try this:
triggerClientEvent (
(function ()
local players = getElementsByType("player")
for i=1, #players do
if players[i] == source then
table.remove(players, i)
break
end
end
return players
end)(), -- IIFE (Immediately Invoked Function Expression)
"runOurClientEvent", root
)