For some reason the script:
1 | for i, v in pairs (game.Players:GetPlayers()) do |
2 | if not v:FindFirstChild( "InMenu" ) then |
3 | 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.