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 » Game Design
Home Search
 

Re: humanoid:Takedamage(x) or humanoid.Health = x

Previous Thread :: Next Thread 
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
27 Oct 2015 03:02 PM
Which method is less glitchy/laggy? I noticed that the collision detection for damaging is pretty bad so I was wondering what method was the best for a Cube 4X the size of the character Flying through the air.
Report Abuse
ChiefAlpha is not online. ChiefAlpha
Joined: 01 Oct 2015
Total Posts: 2014
27 Oct 2015 03:04 PM
Use TakeDamage when you want players with forcefields not to take damage, so in general.
Report Abuse
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
27 Oct 2015 03:09 PM
Please read the question. I asked which method was less laggy/glitchy, not which one damages through forcefields.
Report Abuse
ChiefAlpha is not online. ChiefAlpha
Joined: 01 Oct 2015
Total Posts: 2014
27 Oct 2015 03:09 PM
"Please read the question"

Read my answer. Asking which is less "laggy/glitchy" is a silly question.
Report Abuse
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
27 Oct 2015 04:13 PM
"Use TakeDamage when you want players with forcefields not to take damage"
I wanted to know which method had less problems. not "Use TakeDamage when you want players with forcefields not to take damage"
Report Abuse
antonio6643 is not online. antonio6643
Joined: 30 Aug 2009
Total Posts: 791
27 Oct 2015 04:28 PM
I recommend :TakeDamage(). Neither of them cause lag. Well, at least on my computer they don't.
Report Abuse
ChiefAlpha is not online. ChiefAlpha
Joined: 01 Oct 2015
Total Posts: 2014
27 Oct 2015 04:33 PM
"I wanted to know which method had less problems."

And I told you, it's a dumb question.
Report Abuse
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
29 Oct 2015 10:23 PM
Thank you antonio6643
Report Abuse
ChiefAlpha is not online. ChiefAlpha
Joined: 01 Oct 2015
Total Posts: 2014
29 Oct 2015 10:26 PM
oh my god are you dumb he literally said the same thing i did but not as useful as me
Report Abuse
xLink123 is not online. xLink123
Joined: 07 Aug 2014
Total Posts: 11158
29 Oct 2015 10:34 PM
Use humanoid:TakeDamage(x)

My reasoning behind this is because when one takes damage from their current value of health, they have to use this line:

humanoid.Health = humanoid.Health - x

humanoid:TakeDamage(x) automatically subtracts it from the current value
Report Abuse
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
06 Nov 2015 03:22 PM
Thank you link.
Report Abuse
Blackstride is not online. Blackstride
Joined: 19 Nov 2010
Total Posts: 8133
06 Nov 2015 03:48 PM
Neither of them are laggy.
TakeDamage is better because it subtracts the amount of health
Health just sets the health to a value
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Nov 2015 03:51 PM
Depends on what you prefer, short lines: humanoid:Takedamage(x)
or longer lines: humanoid.Health = humanoid.Health-x

Neither of them will be laggy or glitchy, it only depends on what you prefer to use.



Why? Because I can.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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