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

How do I make a player automatically hold an item upon grabbing it?

When I touch a tool off the ground and pick it up it's only in my inventory, it's never held automatically.

How do I make the Tool held automatically without removing the backpack?

2 answers

You could try a ChildAdded event on the Backpack, it would look something like this.

local player = game.Players.LocalPlayer
local char = player.CharacterAdded:wait() -- Waits for the character

player.Backpack.ChildAdded:connect(function(child) -- Child added event returns the child
	char.Humanoid:EquipTool(child) -- Equip the child that was returned
end)

I don't use those often so let me know if this works, and if anyone knows a better way, let us know.

6 comments

0

Thanks for replying. I'm a bit stupid on scripting, where should I put it?

0

Local script inside of starter pack should be good, hope this helps.

0

Thanks for the help. Sadly, it doesn't work though.

0

Well that sucks, maybe someone else will answer it. I kinda wanna know the answer too now.

0

Actually I fixed it. There was a script I put in the tool that was apparently breaking it. Thanks for all your help.

0

Anytime.

I fixed it by deleting a script that ruined it. Thanks for the help, it's solved.

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