📌  相关文章
📜  从玩家的库存中删除项目 roblox studio - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:34.534000             🧑  作者: Mango

代码示例1
local itemName = "Cup" --Change this
if player.Backpack:FindFirstChild(itemName) and player.Backpack[itemName]:IsA("Tool") then
    player.Backpack.Cup:Destroy()
end --Destroy Non-Equipped tool in inventory / Backpack
if player.Character and player.Character:FindFirstChild(itemName) and player.Character[itemName]:IsA("Tool") then
    player.Character[itemName]:Destroy()
end --Destroy Equipped Tool