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

How to move a tool to somewhere after picking up?

Hello guys i have this script

game.Players.PlayerAdded:Connect(function(plr) 

local tool = plr.Backpack.SledgeHammer


tool.Parent = game.Lighting 


end)

but something isnt right so it's not working anyway i tried like two more scripts to remove the tool in my backpack after picking up this way is the best one i guess. but its not working how can i solve this? this script seems to work from start but output says "no child found" i want to remove the tool after picking it up with a "e to pick up script"

1 answer

✓ Accepted answer

Hello again TheMostDelikanliMan!


To begin with assuming you're trying to remove the tool from the player, you could just do tool:Destroy(). Moving on, you're trying to destroy a tool that the player hasnt been given yet (they just joined the game.


I have some questions for you:

A) Is this a local or server script?

B) Where is the script located at?

C) Have you tried :WaitForChild('SledgeHammer')

--

Furthermore, you're trying to parent the tool whenever a new player joins the game for the first time. Therefore, you script wouldn't run after the player has picked up a tool. You should try adding a tool:Destroy() or tool.Parent = game:GetService('Lighting') inside of the 'E to pick up' script.

1 comment

0

This script is server script in workspace and yes i tried waitforchild with other 2 scripts i guess. I will try to add this to pick up script

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