I Made a health pack tool but i just need it to drop on the ground when you equip it. any help?
1 | local p = game.Players.LocalPlayer |
2 | local tool = script.Parent |
3 | function equipped() |
4 | wait() |
5 | -- what will i put here for it to drop |
6 | end |
7 | tool.Equipped:connect(equipped) |
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!
1 | local p = game.Players.LocalPlayer |
2 | local tool = script.Parent |
3 | function equipped() |
4 | wait() |
5 | tool.Parent = game.Workspace --Removes the tool from the player and places it in the workspace |
6 | end |
7 | tool.Equipped:connect(equipped) |