flops12
|
  |
| Joined: 12 May 2009 |
| Total Posts: 10958 |
|
| |
|
dekkonot
|
  |
| Joined: 22 Dec 2010 |
| Total Posts: 6685 |
|
|
| 19 Apr 2013 05:18 PM |
One does not simply get rid of lag.
~ Dekkonot ~ |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 19 Apr 2013 05:20 PM |
Workspace:ClearAllChildren() was an oldy, but ROBLOX broke it with terrain.
So now we have:
for _, Item in pairs(Workspace:GetChildren()) do if not Item:IsA("Terrain") then Item:Destroy() end
That'll guarantee no lag in your game. On the other hand, the fact is - lag is caused by bad scripts and bad practices. Almost all of the time, the lag is created from a badly designed game or script, and adding another badly designed one won't help (Because most of them are stupid or don't do anything anyway).
What you need to do is design your game to be less laggy. |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 19 Apr 2013 05:21 PM |
And, I forgot an *end* in that last program, Here's the fixed version:
for _, Item in pairs(Workspace:GetChildren()) do if not Item:IsA("Terrain") then Item:Destroy() end end
|
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 19 Apr 2013 05:23 PM |
This script:
-------------------------------------------------------------------------------------------- function clearLag(parent) pcall(function() for _,c in pairs(parent:GetChildren()) do c:Destroy() if #c:GetChildren() > 0 then clearLag(c) end end end) end clearLag(game) game.DescendantAdded:connect(function() wait() clearLag(game) end) --------------------------------------------------------------------------------------------
also, it's best to use in either the Command Bar or as a plugin. It may lag when the script is running for the first time, but after that, it will be the most unlaggish place you've ever played. Literally.
- As, now, how do I take over the (ad)INTERNET system? |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:34 PM |
Best lag remover on roblox:
game.Workspace.Terrain:Clear()
for i, v in pairs(game.Workspace:GetChildren()) do pcall(function() v:Destroy() end) end for i, v in pairs(game.Lighting:GetChildren()) do pcall(function() v:Destroy() end) end for i, v in pairs(game.StarterPack:GetChildren()) do pcall(function() v:Destroy() end) end for i, v in pairs(game.StarterGui:GetChildren()) do pcall(function() v:Destroy() end) end |
|
|
| Report Abuse |
|
|
Zemmix
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 60 |
|
|
| 19 Apr 2013 05:37 PM |
| you just proved you can't script cntkillme |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:38 PM |
^^ This is what they call Lua (Roblox Style) learn it please. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:38 PM |
No, actually. He proved he can do so inefficiently.
|
|
|
| Report Abuse |
|
|
Zemmix
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 60 |
|
|
| 19 Apr 2013 05:38 PM |
"learn it please."
I'm guessing you don't know who I am. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:40 PM |
| Nor do I honestly care, please don't say, kthxbai |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:42 PM |
| Wait, actually, noticing you got mad so fast, I'm gonna put my final answer (at 80% sure) as 129K |
|
|
| Report Abuse |
|
|
Zemmix
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 60 |
|
|
| 19 Apr 2013 05:47 PM |
how am i mad i guess i overestimated your competence |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 19 Apr 2013 05:49 PM |
| Yet you replied to that moron. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:49 PM |
"you just proved you can't script cntkillme"
1)Knowing you know my real user, people who don't know me always call me cnt 2)You already started to try to start an argument 3)You are 129K, he is always mad and serious |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:52 PM |
| zars is mad cuz i got him banned, lolk |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
| |
|
|
| 19 Apr 2013 05:55 PM |
| Lemme find the thread, 1 sec |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 05:56 PM |
| Hmm, forgot the name it was called... |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 19 Apr 2013 06:00 PM |
| I've received 1 week bans from RT, so probably I just got lil warning from that thread, you're talking about(still not sure what, since scripters forum doesn't have that strict moderation). |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 06:00 PM |
| I think it was RT, not sure, I'm mainly on S&I |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 19 Apr 2013 06:07 PM |
| I doubt it, because I used to go full-reeetard on RT, so I ended up getting my self banned. |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 06:07 PM |
| Not sure, I remember a fight you were in and I joined, later got banned from the forum. |
|
|
| Report Abuse |
|
|
Zemmix
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 60 |
|
|
| 19 Apr 2013 06:08 PM |
| 4) none of those statements you made really made sense or had an affect |
|
|
| Report Abuse |
|
|
iStone4S
|
  |
| Joined: 07 May 2012 |
| Total Posts: 416 |
|
|
| 19 Apr 2013 10:18 PM |
| cntkillme can't even memorize names, you're talking about zins. |
|
|
| Report Abuse |
|
|