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 » Scripting Helpers
Home Search
 

Re: Need tool help

Previous Thread :: Next Thread 
WallStreetWolf is not online. WallStreetWolf
Joined: 19 Jun 2014
Total Posts: 2793
11 Jul 2014 09:29 PM
I built a tool, but for the life of me I can't figure out how to write a working script that removes it from the player's backpack after it is used.

I basically heavily edited a gear so that a squirrel follows you around, but I want it to be single use.

Would someone mind writing me a script that would remove it from the player's backpack (not starterpack) after use? I know you guys don't like just forking over scripts but I figure this has to be incredibly simple, even though my attempts are failing
Report Abuse
WallStreetWolf is not online. WallStreetWolf
Joined: 19 Jun 2014
Total Posts: 2793
11 Jul 2014 09:35 PM
Someone please?
Report Abuse
WallStreetWolf is not online. WallStreetWolf
Joined: 19 Jun 2014
Total Posts: 2793
11 Jul 2014 09:38 PM
This has to be such a simple script, right?

Something like...?
That was my best shot, you can see I'm not very good at this.

function onButton1Down(mouse)
Tool:Remove()
end

Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
11 Jul 2014 09:39 PM
tool.Activated:connect(function()
tool:Destroy()
end
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
11 Jul 2014 09:39 PM
tool.Activated:connect(function()
tool:Destroy()
end)

*

my bad missed a bracket
Report Abuse
WallStreetWolf is not online. WallStreetWolf
Joined: 19 Jun 2014
Total Posts: 2793
11 Jul 2014 09:42 PM
That doesn't seem to work sbk.
I'm just inserting a script into the tool and adding those 3 lines of script, is there some other place/way I have to insert the script?
Report Abuse
sbk28 is not online. sbk28
Joined: 15 Nov 2008
Total Posts: 2528
11 Jul 2014 09:44 PM
if it's inside the tool

script.Parent.Activated:connect(function()
script.Parent:Destroy()
end)
Report Abuse
WallStreetWolf is not online. WallStreetWolf
Joined: 19 Jun 2014
Total Posts: 2793
11 Jul 2014 09:47 PM
That makes sense.

Perfect. Thank you so much.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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