Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I fix this script?

Asked by 10 years ago
AddedAdministration = {"Myself",100}
game.Players.PlayerAdded:connect(function(player) -- near end
table.insert(Table, 1,(player))
end
end -- error

')' expected (to close '(' at line 2) near 'end'

It is supposed to insert a player that entered name's into the table.

1 answer

Log in to vote
0
Answered by 10 years ago

The last end, should be :

end)

Also, if you wish to use table.insert to add to AddedAdministration, then do :

table.insert(AddedAdministration, player.Name);

You do this because if you don't specify pos, it defaults to #table+1. Also, just input player.Name.

Ad

Answer this question