generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Removing from backpack

Previous Thread :: Next Thread 
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
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
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
30 Jun 2016 08:56 PM
b1
Report Abuse
kools is not online. 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
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
30 Jun 2016 09:07 PM
Players.Player1.PlayerGui.LocalScript:25: bad argument #2 to '?' (string expected, got Object)
Report Abuse
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
30 Jun 2016 09:20 PM
b2
Report Abuse
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
30 Jun 2016 09:28 PM
b3 Help plz? Any is appreciated ^-^
Report Abuse
Crimsonal is not online. Crimsonal
Joined: 23 Apr 2011
Total Posts: 1795
30 Jun 2016 09:30 PM
code at line 25?
Report Abuse
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
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 is not online. Crimsonal
Joined: 23 Apr 2011
Total Posts: 1795
30 Jun 2016 09:37 PM
Player.Backpack["StrawberrySundae"]:Destroy()


Report Abuse
HeIIoISteaIUsernames is not online. HeIIoISteaIUsernames
Joined: 26 Oct 2012
Total Posts: 2906
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
Titanicman882ftlong is not online. Titanicman882ftlong
Joined: 14 Aug 2012
Total Posts: 430
30 Jun 2016 09:40 PM
Such a simple mistake...thanks lol
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image