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: High Health Humanoid keeps dying

Previous Thread :: Next Thread 
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
15 Jul 2011 02:53 PM
I'm trying to make an RPG character. His health and MaxHealth SHOULD both be 5000. But his Health keeps jumping down to 100. I put a script in him(not free model). But it still does it. Here's the script:

wait(20)
script.Parent.Humanoid.MaxHealth = 5000
wait(0.5)
script.Parent.Humanoid.Health = 5000

What's wrong with it?
Report Abuse
352ynnhoj is not online. 352ynnhoj
Joined: 21 Sep 2010
Total Posts: 1054
15 Jul 2011 02:54 PM
because the max health is higher then 100 it will reset the health to 100. I dont know why roblox does it. try a health regen script instead.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
15 Jul 2011 02:56 PM
[ Content Deleted ]
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
15 Jul 2011 03:22 PM
So, what should I do?
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
15 Jul 2011 03:23 PM
[ Content Deleted ]
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
15 Jul 2011 03:36 PM
I tried that. Still resets to zero.
Maybe ill just go with an RPG with the highest boss having 100 HP and all the swords hurt like 2-10.....that would be a lame RPG, though.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
15 Jul 2011 03:46 PM
[ Content Deleted ]
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
16 Jul 2011 06:22 PM
Could I use this script insted?(in the model)
h = Script.Parent.Humanoid.Health
while h = >5000 then
wait(5)
h = h + 5
end
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
16 Jul 2011 06:39 PM
In Rbx.lua, it's >= for greater than or equal to, and <= for less then or equal to.
Report Abuse
Wil2 is not online. Wil2
Joined: 01 Feb 2008
Total Posts: 728
16 Jul 2011 07:03 PM
here is health add script fixed:
h = script.Parent.Humanoid
while h.Health < 5000 then
if h.MaxHealth < 5000 then
h.MaxHealth = 5000
end
h.Health = h.Health + 100
wait(0.1) --without this, MAJOR LAG THAT GAME FREEZES!
end
Report Abuse
Wil2 is not online. Wil2
Joined: 01 Feb 2008
Total Posts: 728
16 Jul 2011 07:05 PM
check if AI's torso has: Right Shoulder, Left Shoulder, Right Hip and Left Hip
OR
check if there is: Right Arm, Left Arm, Left Leg and Right Leg
OR
Check if AI has Torso because without Torso, AI dies all the time
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
19 Jul 2011 03:24 PM
Ok, it doesnt literally kepp "dying", I meant it keeps dropping.
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
19 Jul 2011 03:34 PM
Ok, I made it a free model. Ik your not going to want to, but can you please use him see what's wrong with the scripts? There's too many to list them all.
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
20 Jul 2011 11:13 AM
Please help me!?!?!?
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
20 Jul 2011 12:11 PM
HELP!!!!!
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
30 Jul 2011 04:42 PM
Somebody please help!
Report Abuse
Wil2 is not online. Wil2
Joined: 01 Feb 2008
Total Posts: 728
01 Aug 2011 11:03 AM
post link to the model(if it's a roblox insite link like www.roblox.com it's allowed)
Report Abuse
64kingJOE is not online. 64kingJOE
Joined: 16 Jan 2016
Total Posts: 7078
01 Aug 2011 11:09 AM
Use free models!!!







=3
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 11:11 AM
>Maybe ill just go with an RPG with the highest boss having 100 HP and all the swords hurt like 2-10.....that would be a lame RPG, though.

No one would notice. The health bar doesn't show numbers. No one would ever know that everything has really low health.
Report Abuse
kingcrowned is not online. kingcrowned
Joined: 16 Jun 2010
Total Posts: 247
01 Aug 2011 12:47 PM
@Wil2
http://www.roblox.com/Zocktar-item?id=54571346
@DavidBowieEyes
Yes, actually, I have a script that shows how much health the character has left.
Report Abuse
Wil2 is not online. Wil2
Joined: 01 Feb 2008
Total Posts: 728
01 Aug 2011 03:04 PM
fixed. I added a script in the humanoid called Health that's first line is wait(5) then it changes the health to the max health:
wait(5)
script.Parent.Health = script.Parent.MaxHealth
--tested and works, it makes Health 5000
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
01 Aug 2011 03:04 PM
Bumping 15 day old threads?
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