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
 

Merh

Previous Thread :: Next Thread 
bob354293 is not online. bob354293
Joined: 26 Oct 2008
Total Posts: 2609
02 Jan 2012 10:05 AM
idk what forum this goes in but,

i have 6 waves, (6 models that look like waves) together,
i have a script that makes them bodyvelocity move, through a terrain, its fine at first when its on top of a brick that i cframed so the terrain has an ocean, but, when the wave hits the terrain, the whole game laggs like more lag then i ever has had before, and i do not know why? any ideas why the game laggs like mad, there is only like 1000 bricks in the whole game ......... probibly less then that .....
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
02 Jan 2012 10:09 AM
Are you using a touched script in EVERY single brick on the wave?

If yes, don't do that, it will activate so many scripts that it will lag...

Try doing this:

function kill(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = 0
end
end

while true do
local p = script.Parent:GetChildren()
for i = 1, #p do
wait()
p[i].Touched:connect(function(hit) kill(hit) end)
end
wait()
end

Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
02 Jan 2012 10:10 AM
Put that in every wave model. It will only activate 1 script, not millions.
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