How to use developer console to remove/give tools to players?

Hey, so I have a question.

I am trying to figure out what script I could use to remove/give players items. To be more specific, I am trying to use developer console (F9 Console) to give a player a item with the ID of the gear, and then how to clear inventory with console also.

I’m assuming you would go to the “Log” tab and then “Server,” because client wouldn’t do anything to them, so what do ya’ll think? Is this possible?

You could make a BindableEvent of the server and use it for your commands, you use :Fire() and send the arguments and the code you do will do what you ask.

Just go into Log >> Server >> The Command Bar At The Bottom, use the following code to insert the gear into the player’s backpack.

game:GetService("InsertService"):LoadAsset(ASSETID).Parent = game.Players.PLAYERNAME.Backpack

1 Like

To give a player a tool from Roblox’s Avatar Shop you can simply run this code in Console.

local Players = game:GetService("Players")
local InsertService = game:GetService("InsertService")

local PLAYER_NAME = "Username"
local GEAR_ID = 121946387

for _, tool in ipairs(InsertService:LoadAsset(GEAR_ID):GetChildren()) do
	tool.Parent = Players[PLAYER_NAME].Backpack
end

-- and to remove tools from a player's Backpack:

Players[PLAYER_NAME].Backpack:ClearAllChildren()
1 Like