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

|?| Starter Player Script ( Changing the health value to the stats value ) ( Doesn't work )

Asked by 4 years ago

local Players = game:GetService("Players").LocalPlayer

repeat wait() until Players.Character

local Humanoid = Players.Character:FindFirstChild("Humanoid")

local Stats = Players:FindFirstChild("Stats") local Health2 = Stats:FindFirstChild("Health")

while wait() do if Humanoid.Health == Humanoid.MaxHealth then --If Max health then not only adding stats also setting health to max Humanoid.MaxHealth = 250 + (Health2.Value * 50) Humanoid.Health = Humanoid.MaxHealth else Humanoid.MaxHealth = 250 + (Health2.Value * 50) --if not max then only adding stats end end

0
It will be helpful if you'll keep the script in Lua Block Code BestCreativeBoy 1395 — 4y
0
Try keeping the script in StarterGui BestCreativeBoy 1395 — 4y

Answer this question