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 tool drop where the player stands on equipped?

I Made a health pack tool but i just need it to drop on the ground when you equip it. any help?

local p= game.Players.LocalPlayer
local tool= script.Parent
function equipped()
wait()
-- what will i put here for it to drop
end
tool.Equipped:connect(equipped)

1 answer

since there is no method for making a tool de-equip, we just need to assign the tool's parent. Usually when a player manually de-equips a tool, it will go to the workspace!

local p= game.Players.LocalPlayer
local tool= script.Parent
function equipped()
	wait()
	tool.Parent = game.Workspace --Removes the tool from the player and places it in the workspace
end
tool.Equipped:connect(equipped)

6 comments

0

Yea But i want it to drop where the player stands

0

@xShadowNight. It automatically does. It's position is the same no matter what parent it is assigned. I tested it so it should work!

0

It doesn't work with me... sorry i must be a pain

0

Okay, let's go through a check list, Make sure that your tool contains a part labeled 'Handle'. If there are more than one parts, make sure they're welded. And please make sure that the script is a 'Local Script' and not a normal script. Hope this helps!

0

Yea its drops where it was in the workspace, not where the player was handling it

0

Okay, I tested it several times in different scenarios. It does work. Can you screenshot your explorer so I can help you further. My guess is that you don't have a part named Handle in the tool. But I could be wrong.

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