I want to make an overheal effect, but I HAVE NO IDEA how to.
Example: The heavy has a normal maximum health of 300, but overhealing him with default overheal amount changes his health to 150. Not instantly, but his max health rises. And when if he’s not being healed or after a few seconds, it’ll start to go back down to normal health.
oldHealth = game.workspace.playername.Humanoid.MaxHealth
for i = 300, 450, 1 do
game.workspace.playername.Humanoid.MaxHealth = i
game.workspace.playername.Humanoid.Health = i
end
Above is the overheal
Below is when you are not getting healed but are still overhealed
repeat
game.workspace.playername.Humanoid.MaxHealth = game.workspace.playername.Humanoid.MaxHealth - 1
wait (0.5)
until game.workspace.playername.Humanoid.MaxHealth = oldHealth
end