|
| 30 Jun 2016 08:44 PM |
I have two questions:
1. How would I be able to remove 1 object from the backpack 2. How would I force the player to unequip the object, then remove it; if they player has the object equipped? |
|
|
| Report Abuse |
|
|
| |
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 30 Jun 2016 08:57 PM |
You can destroy items in a person's backpack with the Destroy method. I think this will work for both if it's equipped and non-equipped.
player.Backpack["Some tool"]:Destroy()
You have to replace "Some tool" with the name of the item you want to remove.
I THINK this works. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 09:07 PM |
| Players.Player1.PlayerGui.LocalScript:25: bad argument #2 to '?' (string expected, got Object) |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Jun 2016 09:28 PM |
| b3 Help plz? Any is appreciated ^-^ |
|
|
| Report Abuse |
|
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
| |
|
|
| 30 Jun 2016 09:35 PM |
Code: Pointed to is L25
Table1.ClickDetector.MouseClick:connect(function() StrawberrySundae.Equipped:connect(function() ---> Player.Backpack[StrawberrySundae]:Destroy() print("yay") end) if Toggle1 == false and ToggleEquip == false then Toggle1 = true Frame.Visible = true print("Displaying..") elseif Toggle1 == true then Toggle1 = false Frame.Visible = false print("Removing..") elseif ToggleEquip == true then return end end) |
|
|
| Report Abuse |
|
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
|
| 30 Jun 2016 09:37 PM |
Player.Backpack["StrawberrySundae"]:Destroy()
|
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 09:38 PM |
Player.Backpack.StrawberrySundae:Destroy()
i steal usernames, any user who talks to me is the username i stole |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 09:40 PM |
| Such a simple mistake...thanks lol |
|
|
| Report Abuse |
|
|