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

How can i remove a tool from a players backpack?

Asked by 5 years ago

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

0
you just reparent the tool? User#5423 17 — 5y
0
what??? Badgehunter072 0 — 5y
0
tool.Parent = new parent User#5423 17 — 5y
0
You can either destroy the tool or change the parent. lunatic5 409 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Use tool:Destroy().

0
Dont do an answer just comment. WillBe_Stoped 71 — 5y
Ad
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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)
0
Don't use Lighting to store tools. lunatic5 409 — 5y
0
You can though. Also what should i use? WideSteal321 773 — 5y
0
ReplicatedStorage or ServerStorage, they’re made for storage ABK2017 406 — 5y

Answer this question