Method of Player
player:take
Up to count (1 unless you say) of what matches, the hand first; answers how many it took.
player:take(item: ItemMatch, count: number?) → number
Parameters
itemItemMatchcountnumberReturns
numberUsed in
player:take("coal", 8) -- takes up to 8, the hand first; answers how many it tookPlayers`player:give`, `player:take`, `player:inventory` and `player:count` work onPlayersplayer:take({ id = "copper_ingot" }, 2) -- up to 2 of them; answers how many it tookItemsplayer:take(COPPER, 2) -- an item table matches by its idItems