|
| 21 Mar 2017 02:26 PM |
| im making # ## arena, when you TP to spawn i had it clear player backpack however if you're currently holding the sword, it wont be cleared. is there any way to force de-equipping of an item? are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:27 PM |
grr
*im making a sword fight arena when you TP to spawn i had it clear player backpack however if you're currently holding the sword, it wont be cleared. is there any way to force de-equipping of an item?
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Mar 2017 02:27 PM |
If a player equips a tool it will be parented to their character.
Find the character and then destroy it. |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:28 PM |
Find the tool in their character*
The problem is I type too fast. |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:28 PM |
thanks! was certain there had to be a way to do it, just didn't know the function
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:28 PM |
| Humanoid:UnequipTools is a better solution |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:34 PM |
did not use humanoid:unequip tools however used the removal method, did work. source:
function onTouch(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then if (humanoid.Parent.LinkedSword ~= nil) then humanoid.Parent.LinkedSword:Destroy() end end end
script.Parent.Touched:connect(onTouch)
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:35 PM |
| If you destroy the tool u wont be able to use it again |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2017 02:39 PM |
ill explain why i did that
basically, my game is a sword arena. there is a teleporter from the "observer deck" to the arena itself. teleporting to the arena grants you a sword. teleporting from it completely removes it from your inventory, to avoid spawnkillers.
i originally had trouble because i didnt know that equipped weapons were parented to character.
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|