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: Any way to make zombies not so laggy?

Previous Thread :: Next Thread 
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 02:46 PM
I put 10 zombies in my zombie place and instant lag for me. (I have really bad computer, but still)
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
14 Oct 2013 02:50 PM
One of the scripts in the zombies uses while loops increase the wait time.
Report Abuse
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 02:52 PM
So wait...
There's a script in the zombie that uses a while loop?

And to reduce lag all I should do is increase the wait time?
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
14 Oct 2013 02:53 PM
Yeah. It's the one that follows the nearest player.

I know this because I took a peek at one a few days ago to make my own.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
14 Oct 2013 02:54 PM
Roblox did a blog on this :P

Reducing lag in zombies :)
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
14 Oct 2013 02:54 PM
And yes, evolved is correct.
Report Abuse
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 02:56 PM
while true do
wait(math.random(1,5))
local target = findNearestTorso(script.Parent.Torso.Position)
if target ~= nil then
script.Parent.Humanoid:MoveTo(target.Position, target)
end

So I should change the math.random(1,5) to... Say... math.random(10,15)?

Or what would be an appropriate time?
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
14 Oct 2013 02:57 PM
No use while wait(5) do
Report Abuse
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 02:57 PM
Not sure what you mean.

Copy and paste the script and change it to what you mean please.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
14 Oct 2013 02:58 PM
Or something like
while wait (1.5) do

That may make the game more effective and have the zombies react well.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
14 Oct 2013 02:58 PM
while wait(1.5) do
wait(math.random(1,5))
local target = findNearestTorso(script.Parent.Torso.Position)
if target ~= nil then
script.Parent.Humanoid:MoveTo(target.Position, target)
end
Report Abuse
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 02:59 PM
Thanks.
Report Abuse
randomname5k is not online. randomname5k
Joined: 12 Aug 2009
Total Posts: 8892
14 Oct 2013 03:05 PM
Still tad bit laggy. But about 10x as better.

Thanks guys.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
15 Oct 2013 09:47 AM
Always glad to help :D
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