f = game.Workspace:FindFirstChild("Humanoid",true) if f.Parent.Name == "Player1" then while true do if f.Health <= 99 then f.Health = f.Health + 1 wait(.01) end end end
A very simple script to heal me when injured rapidly during Edit on ROBLOX, yet I can't fathom why f can't be found.
A easy solution would be to use a local script in the StarterPack.
local player = game.Players.LocalPlayer -- Get's the player. local playerhumanoid = player.Character.Humanoid -- Do not need to put wait() because in edit, the character loads instantly, added in humanoid with this variable to condense the script. playerhumanoid.HealthChanged:connect(function() if playerhumanoid.Health < 99 then playerhumanoid.Health = playerhumanoid.Health + 1 -- We do not need keep calling on the function manually, it will call itself wen it adds health back wait() end)
There might be a few errors in there, let me know if there are and I will fix them.