For some reason the script:
for i, v in pairs(game.Players:GetPlayers()) do if not v:FindFirstChild("InMenu") then table:insert(contestants,v)
does not work the word: table is highlighted but the word insert isnt highlighted even though in the tutorial video im watching. it is highlighted. And whenever i load the game i get this error message:
18:27:46.776 - ServerScriptService.Game Logic:15: bad argument #2 (number expected, got table)
Does anyone know how to fix this?
You're incorrectly indexing the table
. The appropriate format is table.insert ( array t, number pos = #t+1, Variant value )
not table:insert
.
If this helped out, consider accepting this answer. If not, comment below and I'll be sure to help.