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: Any auto clean up script that removes blocks?

Previous Thread :: Next Thread 
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
01 May 2017 07:10 PM
I am working a tycoon, and im putting in tanks, and vehicles. One problem I have is that after you blow up the vehicles, the wreckage stays there until someone re-spawns it. It can cause lag after a few vehicles are destroyed.

Does anyone know how to make the blocks dis-appear after 15 seconds from being "Un-welded" or being disconnected from their model?

Id prefer it if the blocks slowly went translucent before dis-appearing, but either way is fine :P
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
01 May 2017 07:13 PM
game:GetService("Debris"):AddItem(Part,1)
Something like that.
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
01 May 2017 07:15 PM
Could you explain on approximately what I have to do?

And is there a way I can detect to see if the Vehicle has exploded or not?

-Thanks!
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
01 May 2017 07:21 PM
You have to find out when a part falls of or what ever you're trying to make trigger it, get that part then just AddItem
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
01 May 2017 07:30 PM
This is what I am trying to do:

If a piece of a vehicle falls off, remove that specific block after 15 seconds.



If I do it the way that you recommended, do I have to put the script in every single piece of the vehicle??? Or is there a way to do it through the model?

Another thing that I can do is to respawn the vehicle after a specific block inside the vehicle that I choose gets ripped from its weld, I dont know how to check if the block is not part of its weld or model :P
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
05 May 2017 01:54 PM
Bump
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
05 May 2017 01:58 PM
You should probably learn to script before doing this.

wiki.roblox.com
Report Abuse
Diligent_Coder is not online. Diligent_Coder
Joined: 20 Jul 2011
Total Posts: 1314
05 May 2017 01:59 PM
local model = here


for i,v in ipairs(model:GetChildren()) do
game:GetService("Debris"):AddItem(v, 15)

end


Join my group: https://www.roblox.com/My/Groups.aspx?gid=3217670
Report Abuse
hasang1 is not online. hasang1
Joined: 09 Nov 2012
Total Posts: 903
05 May 2017 02:07 PM
@Dil
Just add za whole model lol
Report Abuse
Calviski is not online. Calviski
Joined: 03 Dec 2016
Total Posts: 209
05 May 2017 02:09 PM
if game.Workspace.Part.Visible = true
then game.Workspace.Part:Destroy()
Report Abuse
Diligent_Coder is not online. Diligent_Coder
Joined: 20 Jul 2011
Total Posts: 1314
05 May 2017 03:40 PM
^Was that even an attempt to give him a code?


Join my group: https://www.roblox.com/My/Groups.aspx?gid=3217670
Report Abuse
Calviski is not online. Calviski
Joined: 03 Dec 2016
Total Posts: 209
05 May 2017 04:03 PM
no lol @dili
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
05 May 2017 06:06 PM
I know how to code :/

I just dont know too much on Roblox specifics, but do I need to put a heartbeat loop for your code @Diligent_Coder?
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
05 May 2017 06:20 PM
I tried the script out, and it didnt do anything. Did I do something wrong?


I placed it as a normal script and I went to my model for the variable.
Report Abuse
COOKCASE22 is not online. COOKCASE22
Joined: 01 Sep 2013
Total Posts: 818
05 May 2017 06:22 PM
*facepalm*
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
05 May 2017 06:23 PM
Instead of "face palming" would you mind trying to help out? Or just dont reply at all.
Report Abuse
GamingRadar101 is not online. GamingRadar101
Joined: 01 Jul 2016
Total Posts: 61
05 May 2017 06:36 PM
Oh nevermind, so it deletes the model no matter what, im going to try to give the vehicle "Health" so it will delete it after it has no "Health"

If you know a better way to do this, let me know.
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