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: Why are ModuleScripts so laggy????????

Previous Thread :: Next Thread 
PoptartNoahh is not online. PoptartNoahh
Joined: 06 Jul 2015
Total Posts: 11063
27 Jul 2016 09:29 AM
Ok so I have a modulescript in ReplicatedStorage and even the SIMPLEST function makes a massive spike in script performance

for example:
function _M:Heal(PlayerName, Amount, Overcharge)
if Overcharge==false then
game.Players[PlayerName].Character.Humanoid.Health=(game.Players[PlayerName].Character.Humanoid.Health+Amount)%100
else --overcharge=true
game.Players[PlayerName].Character.Humanoid.Health=(game.Players[PlayerName].Character.Humanoid.Health+Amount)%200
end

end

^^spikes it up along with a bunch of simple functions
help?
Report Abuse
Everoso is not online. Everoso
Joined: 26 Jul 2016
Total Posts: 189
27 Jul 2016 09:30 AM
They aren't laggy, not sure if this is a troll. What are you doing that's making it so inefficient?


Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
27 Jul 2016 09:30 AM
Probably your coding. Modules work fine for me. ;)


( ͡• ◡ ͡•) -=[ RAP: 347,998 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
PoptartNoahh is not online. PoptartNoahh
Joined: 06 Jul 2015
Total Posts: 11063
27 Jul 2016 09:31 AM
THIS IS NOT A TROLL :(
i'm being serious, i know about script performance and the scripts are super simple
it just spikes it up like CRAZY
Report Abuse
PoptartNoahh is not online. PoptartNoahh
Joined: 06 Jul 2015
Total Posts: 11063
27 Jul 2016 09:33 AM
like the script above literally has a full 1 second delay :(
Report Abuse
PoptartNoahh is not online. PoptartNoahh
Joined: 06 Jul 2015
Total Posts: 11063
27 Jul 2016 09:49 AM
@durst
the coding is about as simple as is it gets

on part.Touched it checks for humanoid as usual and THEN calls the module to run the function
it works fine but it spikes hard

is it because of where the modulescript is?
p.s. my computer is fine
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
27 Jul 2016 09:52 AM
wiki.roblox.com/index.php?title=Fighting_Lag


( ͡• ◡ ͡•) -=[ RAP: 348,045 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
PoptartNoahh is not online. PoptartNoahh
Joined: 06 Jul 2015
Total Posts: 11063
27 Jul 2016 09:59 AM
i read that :(
and i also read the official lua manual to fighting lag a while back
my scripts should have no lag

interestingly, there is ZERO delay in studio (when it's local) but in game it's bad)
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