|
| 15 Apr 2014 08:56 PM |
This script is supposed to change your health and max health when you have the armor on. It makes your max health 500, but the regular health only goes to 175 then you heal
num = 500
game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(child) if child.Name == "Heavy" then game.Players.LocalPlayer.Character.Humanoid.MaxHealth = num game.Players.LocalPlayer.Character.Humanoid.Health = num end end)
game.Players.LocalPlayer.Backpack.ChildRemoved:connect(function(child) if child.Name == "Heavy" then game.Players.LocalPlayer.Character.Humanoid.MaxHealth = game.Players.LocalPlayer.Character.Humanoid.MaxHealth - num game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health - num end end) |
|
|
| Report Abuse |
|
|
| |
|
Zakkeh
|
  |
| Joined: 24 Oct 2013 |
| Total Posts: 1133 |
|
|
| 15 Apr 2014 09:00 PM |
I don't notice the problem, however are you sure the item going in is called "Heavy" and the location it enters is "Backpack", if not it may be a problem with "Heavy"'s code.
--I be chewin' teh Dino Nuggets. |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2014 09:01 PM |
| Yea it all works, it makes the max health 500 but the players health is at 175 |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2014 09:03 PM |
| Apparently it was just a matter of having a wait statement between the health and max health. |
|
|
| Report Abuse |
|
|