Can anyone tell me how I could create a health system based off an IntValue?
✓ ANSWER ACCEPTED
How could I create a health system based off an IntValue?
1 answer
✓ Accepted answer
The easiest way to do this is is by using a LocalScript and RunService
**LocalScript **
local player = game.Players.LocalPlayer;
local stat = player.leaderstats.Health;
stat.Changed:connect(function()
script.Parent.Text = "Health: " .. stats.Value;
end);
I hope this helped. If it did please accept this as the answer. If it didn't please feel free to ask any questions you have.
3 comments
0
Why do that when all you have to do is use .Changed?
0
Thank you
0
Yeah no problem.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Where is your code? We can't help without you trying!
Right now all I have is a GUI script that displays the health
Stat = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Health while true do wait(2) script.Parent.Text = "Health:" ..Stat.Value end
It's more efficient to use a IntConstrainedValue