How can I make a player regen health faster, do I have to make it in a script?
✓ ANSWER ACCEPTED
How can I make a player regen health faster?
2 answers
✓ Accepted answer
--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
Im sorry if this isn't my thread, but does the script have to be in a local script?
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
THANK YOU!
Yep, be sure to give rep and accept answer. :)