This is in a local script with the GUI being the script's parent.
local text = script.Parent.Text local humanoid = game.Players.LocalPlayer.Character.Humanoid humanoid.HealthChanged:connect(function(health) print(health) text = health end)
It prints the health correctly in the output, but it doesn't want to display it in in the GUI for some reason. Can someone please help me?
local text =script.Parent.Text local humanoid = game.Players.LocalPlayer.Character.Humanoid humanoid.HealthChanged:connect(function(health) print(health) text=tostring(health) end)
This should work. Im just making health a string. If it doesn't work then sorry.