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

Surface Gui's and Humanoid Health?

Asked by 9 years ago

Hi I'm trying to make a surface Gui show a humanoids health, the problem, I think, is that for the Surface Gui (Im using a Label) it needs a string but im giving it a int (Humanoid Health). Please help! How can I either turn a string to int or int to string, and if there is a eaiser way please tell me! Thanks!

1 answer

Log in to vote
0
Answered by
Redbullusa 1580 Moderation Voter
9 years ago

Since, more than likely, the surface GUI is going to be a read-only display of the humanoid's health, you don't really need to convert a string to an integer or vice-versa, unless if you're using the Text property of a TextLabel (though, I personally recommend to use the Health value directly from the Humanoid).

Nonetheless...

tostring(arg) converts the given argument into a string.

tonumber(arg) converts the given argument into a number.

0
Thanks! Would vote up but people and admins hate me and i have -11 rep SirKitten2000 0 — 9y
Ad

Answer this question