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: Nil

Previous Thread :: Next Thread 
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 02:02 PM
I am so stupid. I forgot about 'nil'

function OnSelected()
script.Parent = nil
script.Parent.Selected:connect(OnSelected)

It's supposed to make the hopperbin tool to work without it's appearance on the players gears.
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
05 Dec 2011 02:08 PM
Should work, btw, the better way to do the script is

script.Parent.Selected:connect(function()
script.Parent = nil
end)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 02:14 PM
So your telling me that you showed the easier way?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 02:15 PM
Thx, you refreshed my brain...
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
05 Dec 2011 02:19 PM
silly Miro, forgetting his anonymous functions.,..
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 02:22 PM
I forgot it. -_-' By the way, how did you get that troll hat?
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
05 Dec 2011 03:00 PM
You gotta be a troll, duh!


Kidding poke :P
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
05 Dec 2011 03:07 PM
contest...
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 03:30 PM
:P
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
05 Dec 2011 03:33 PM
Easy

bin = script.Parent
function OnSelected()
script.Parent = bin
bin.Parent = nil
script.Parent.Selected:connect(OnSelected)

First of all when you did this
script.Parent = nil
It removed the script.
You were suppose to do,
script.Parent.Parent = nil --To remove the hopperbin.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
05 Dec 2011 03:37 PM
@xvy

That helped alot, next time no more forgeting 'nil'. Thanks guys...
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
05 Dec 2011 03:41 PM
Np
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