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

How Do I make a tool drop where the player stands on equipped?

Asked by 9 years ago

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

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

1 answer

Log in to vote
0
Answered by 9 years ago

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!

1local p= game.Players.LocalPlayer
2local tool= script.Parent
3function equipped()
4    wait()
5    tool.Parent = game.Workspace --Removes the tool from the player and places it in the workspace
6end
7tool.Equipped:connect(equipped)
0
Yea But i want it to drop where the player stands xShadowNight 20 — 9y
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! minikitkat 687 — 9y
0
It doesn't work with me... sorry i must be a pain xShadowNight 20 — 9y
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! minikitkat 687 — 9y
View all comments (2 more)
0
Yea its drops where it was in the workspace, not where the player was handling it xShadowNight 20 — 9y
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. minikitkat 687 — 9y
Ad

Answer this question