of     1   

ChefJustice
#139456277Sunday, July 06, 2014 9:13 PM GMT

wait(5) Humanoid = game.Players.LocalPlayer.Character.Humanoid Humanoid.Health.Changed:connect(function(Val) maxHealth = Humanoid.MaxHealth script.Parent.Health.Text = ("" .. Val .. "/" .. maxHealth "") end) It isn't working and I can't exactly figure out why or how I can fix it. I'm trying to make it so when a player's health is changed it displays their new health in the form of text on a GUI. ~egmen
ScottRhode
#139457318Sunday, July 06, 2014 9:24 PM GMT

no spaces after and before .. and no empty string after the last paste. change to (""..Val.."/"..maxHealth)
ChefJustice
#139457603Sunday, July 06, 2014 9:27 PM GMT

No, that doesn't seem the be the problem. 'attempt to index field "Health" (a number value)' ~egmen
ChefJustice
#139459189Sunday, July 06, 2014 9:43 PM GMT

bump ~egmen
AntonioLorenzi
#139460248Sunday, July 06, 2014 9:53 PM GMT

um isn't the humanoid in the game.Workspace.Player ?
Vuva
#139460724Sunday, July 06, 2014 9:58 PM GMT

That's not how .Changed works: Humanoid = game.Players.LocalPlayer.Character.Humanoid Humanoid.Changed:connect(function(prop) if prop=="Health" then maxHealth = Humanoid.MaxHealth script.Parent.Health.Text = (Humanoid[Val] .. "/" .. maxHealth) end end) And you didn't need the pointless empty quotes near the beginning and ending of the text
Vuva
#139460934Sunday, July 06, 2014 10:00 PM GMT

Whoops, fix: Humanoid = game.Players.LocalPlayer.Character.Humanoid Humanoid.Changed:connect(function(prop) if prop=="Health" then maxHealth = Humanoid.MaxHealth script.Parent.Health.Text = (Humanoid[prop] .. "/" .. maxHealth) end end)

    of     1