|
| 09 Apr 2017 06:43 PM |
I have a localscript inside a GUI that detects when the player presses '1'. This script has this line of code in it:
local sword = script.Parent.Slot1.Tool.Tool:Clone() player.Character.Humanoid:EquipTool(sword)
And the sword does appear, but drops on the floor. The player still has his/her arm up as if he/she was holding it. When the sword was in StarterPack, it worked fine. Any ideas on why the the sword(Tool.Handle) keeps dropping? How can I fix this? |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2017 06:55 PM |
Does the same thing happen in studio, and in game. Or are you getting different results?
|
|
|
| Report Abuse |
|
|
|
| 09 Apr 2017 06:59 PM |
| In Studio, it works perfectly fine, you can equip the sword and it actually appears in your hand. In game, however, the tool appears in the air, dropping to the baseplate. No matter how many times you re-equip, the tool will always end up in the same location. |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2017 07:15 PM |
Nevermind, I fixed this by putting the clone of the sword in the player's avatar...
local sword = script.Parent.Slot1.Tool.Tool:Clone() sword.Parent = player.Character --for some reason this fixes it player.Character.Humanoid:EquipTool(sword) |
|
|
| Report Abuse |
|
|