Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i remove a tool from a players backpack?

i want to make it so when a tool is clicked it dissapears from the backpack like you used it (medkits stuff like that) but i am unsure how to do that, i have tried many ways but none of them seem to work please help

4 comments

0

you just reparent the tool?

0

what???

0

tool.Parent = new parent

0

You can either destroy the tool or change the parent.

2 answers

This script changes where the tool is (Moves it to lighting)

(YOU MAY HAVE TO EDIT AROUND THIS TO MAKE IT WORK HOW YOU WANT IT TOO)

game.Players.PlayerAdded:Connect(function(plr) --player added

local tool = plr.Backpack.TOOLNAMEHERE--change TOOLNAMEHERE to the name of the tool


tool.Parent = game.Lighting --move it to lighting

--wait (5) --//Remove "--" if you want some sort of cooldown
--tool.Parent = plr.Backpack --//same thing here
end)

3 comments

0

Don't use Lighting to store tools.

0

You can though. Also what should i use?

0

ReplicatedStorage or ServerStorage, they’re made for storage

This discussion is preserved as it was. New answers, comments, and votes are closed.