KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 02 Aug 2014 02:55 PM |
| To make it so if a player unequips a tool, the tool then exits the player's inventory and goes on the ground as if they dropped it with backspace? If so how can I do that? |
|
|
| Report Abuse |
|
|
| |
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 02 Aug 2014 02:57 PM |
| How do you detect if a tool is unequipped? Is it like Tool.Unequipped or something? |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 02 Aug 2014 02:59 PM |
Wiki says yes. So I could do like: Tool.Unequipped:connect(function(dropt) Tool.Parent = workspace end) ? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Aug 2014 03:03 PM |
| That should work, but you should probably yield if you get the error "trying to set parent to blah at the same time setting to blah" |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 02 Aug 2014 03:07 PM |
yes I think i got that. Something unexpectedly tried to set the parent of Bomb to Workspace while trying to set the parent of Bomb. Current parent is Backpack. How can I fix it from doing this? |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 02 Aug 2014 03:08 PM |
| Nevermind, I just had to add a wait. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 Aug 2014 03:08 PM |
| Add like a wait(0.1) before parenting to workspace |
|
|
| Report Abuse |
|
|