Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a player regen health faster?

Asked by 10 years ago

How can I make a player regen health faster, do I have to make it in a script?

2 answers

Log in to vote
3
Answered by 10 years ago

--Finding the character function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do child = parent.ChildAdded:wait() if child.Name==childName then return child end end end --Variables local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid") --Start of Regen health while true do local s = wait(0.01) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then health = health + 0.1 * s * Humanoid.MaxHealth if health * 1.05 < Humanoid.MaxHealth then Humanoid.Health = health else Humanoid.Health = Humanoid.MaxHealth end end end
1
THANK YOU! alan3401 28 — 10y
0
Yep, be sure to give rep and accept answer. :) IntellectualBeing 430 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

Im sorry if this isn't my thread, but does the script have to be in a local script?

Answer this question