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
 

Can someone make this work?

Previous Thread :: Next Thread 
jaredvaldez4 is not online. jaredvaldez4
Joined: 06 Jul 2008
Total Posts: 4239
24 Feb 2012 12:26 PM
if Parent =~ game.Workspace then
script.Parent:remove()
else
end
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:27 PM
[ Content Deleted ]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
24 Feb 2012 12:27 PM
Fancy post count XD


Assuming parent is a variable.


if Parent ~= game.Workspace then

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
jaredvaldez4 is not online. jaredvaldez4
Joined: 06 Jul 2008
Total Posts: 4239
24 Feb 2012 12:29 PM
@1WOOF1
But I want it say if it is a in a model then it won't destroy it.
Or it wait's until it is in workspace then removes it.
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:31 PM
[ Content Deleted ]
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:32 PM
[ Content Deleted ]
Report Abuse
jaredvaldez4 is not online. jaredvaldez4
Joined: 06 Jul 2008
Total Posts: 4239
24 Feb 2012 12:32 PM
No I mean like.
Tool >
Bullet >
When it goes outside the tool or into workspace.
It will remove it self.
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:37 PM
[ Content Deleted ]
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:38 PM
[ Content Deleted ]
Report Abuse
Septia is not online. Septia
Joined: 23 Jan 2010
Total Posts: 167
24 Feb 2012 12:38 PM
repeat wait() until not script.Parent:IsA("Tool")
script:Remove()
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:39 PM
[ Content Deleted ]
Report Abuse
Septia is not online. Septia
Joined: 23 Jan 2010
Total Posts: 167
24 Feb 2012 12:40 PM
Huh? I think yours is more generic. So it would probs be more useful
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
24 Feb 2012 12:41 PM
[ Content Deleted ]
Report Abuse
jaredvaldez4 is not online. jaredvaldez4
Joined: 06 Jul 2008
Total Posts: 4239
24 Feb 2012 12:55 PM
No no it removes script.Parent if it is in workspace if it is a tool or anything it stays OK
Report Abuse
jaredvaldez4 is not online. jaredvaldez4
Joined: 06 Jul 2008
Total Posts: 4239
24 Feb 2012 12:58 PM
Don't you need a IF and a end?
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
24 Feb 2012 02:22 PM
Its ~= not =~

Also. Define "Parent"
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
24 Feb 2012 02:34 PM
Maybe this;
While script.Parent~=Workspace do
script.Parent:remove()
else
script:Remove()
end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Feb 2012 03:05 PM
"But I want it say if it is a in a model then it won't destroy it.
Or it wait's until it is in workspace then removes it."

repeat wait() until script.Parent.ClassName == "Model"
script.Parent:Destroy()

Didn't really look at this topic because I'm listening to dubstep but ...Yeah
Report Abuse
chillycheeseburger is not online. chillycheeseburger
Joined: 14 Mar 2011
Total Posts: 2
24 Feb 2012 03:16 PM
Where can you get free scripts?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Feb 2012 03:23 PM
And jared, don't act like you know how to script -_-
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