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: Anyone know any good scripts to get rid of lag?

Previous Thread :: Next Thread 
flops12 is not online. flops12
Joined: 12 May 2009
Total Posts: 10958
19 Apr 2013 05:17 PM
?
Report Abuse
dekkonot is not online. 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 is not online. 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 is not online. 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 is online. 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
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
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 is not online. Zemmix
Joined: 25 Nov 2011
Total Posts: 60
19 Apr 2013 05:37 PM
you just proved you can't script cntkillme
Report Abuse
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 05:38 PM
^^
This is what they call Lua (Roblox Style) learn it please.
Report Abuse
Dialoghack is not online. Dialoghack
Joined: 01 Feb 2011
Total Posts: 27
19 Apr 2013 05:38 PM
No, actually. He proved he can do so inefficiently.
Report Abuse
Zemmix is not online. 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
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 05:40 PM
Nor do I honestly care, please don't say, kthxbai
Report Abuse
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
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 is not online. 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 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 Apr 2013 05:49 PM
Yet you replied to that moron.
Report Abuse
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
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
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 05:52 PM
zars is mad cuz i got him banned, lolk
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 Apr 2013 05:54 PM
"banned"

?
Report Abuse
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 05:55 PM
Lemme find the thread, 1 sec
Report Abuse
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 05:56 PM
Hmm, forgot the name it was called...
Report Abuse
zars15 is not online. 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
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
19 Apr 2013 06:00 PM
I think it was RT, not sure, I'm mainly on S&I
Report Abuse
zars15 is not online. 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
cntkillme721 is not online. cntkillme721
Joined: 17 Sep 2009
Total Posts: 351
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 is not online. 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 is not online. 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
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