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: Why isn't this working?

Previous Thread :: Next Thread 
cerealman002 is not online. cerealman002
Joined: 09 Dec 2007
Total Posts: 2423
03 Aug 2012 01:15 PM
When I use this part in a script it doesn't remove it from my backpack at all once it's given to me or the other person

if script.Parent.Parent.Name == "CEREALMAN002" then
script:remove()
elseif script.Parent.Parent.Name == "otherperson" then
script:remove()
end
Report Abuse
Swordphin123 is not online. Swordphin123
Joined: 09 Apr 2008
Total Posts: 5234
03 Aug 2012 01:17 PM
Use :Destroy() instead.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
03 Aug 2012 01:44 PM
if script.Parent.Parent.Name == "CEREALMAN002" or script.Parent.Name == "otherperson" then
script:Destroy()
end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
03 Aug 2012 01:44 PM
^

Change the parent of script.Parent.Name to script.Parent.Parent.Name
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
03 Aug 2012 01:47 PM
I noticed your name isn't in caps, as that could be the problem.

† KMXD † ~ Evil Duck Overlord, bent on world domination.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
03 Aug 2012 01:48 PM
@knightmare

if script.Parent.Parent.Name:upper() == "CEREALMAN002" then
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
03 Aug 2012 01:50 PM
@mix

if script.Parent.Parent.Name:upper() == "CEREALMAN002" or script.Parent.Parent.Name:upper() == "CAPS" then
script:Destroy()
end

† KMXD † ~ Evil Duck Overlord, bent on world domination.
Report Abuse
cerealman002 is not online. cerealman002
Joined: 09 Dec 2007
Total Posts: 2423
03 Aug 2012 01:57 PM
My name just shows up as lower case on the forums. No clue why, but it really is in all caps...
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