Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
|
| 31 May 2014 10:22 AM |
I've made a script which should give the player 25 health and it was working before until I made the value but the value does change so I was wondering what the problem is, the script is in a part and the part is in workspace.
function onTouch(h) local character = h.Parent local player = game.Players:GetPlayerFromCharacter(character) if h.Name == "Left Leg" or h.Name == "Right Leg" or h.Name == "Left Arm" or h.Name == "Right Arm" or h.Name == "Torso" or h.Name == "Head" then if player.Backpack.Health1.Value == false then h.Parent.Humanoid.Health = h.Parent.Humanoid.Health + 25 wait(0.01) player.Backpack.Health1.Value = true wait(60) player.Backpack.Health1.Value = false elseif player.Backpack.Health1.Value == true then h.Parent.Humanoid.Health = h.Parent.Humanoid.Health + 0 end end end
script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
| |