It says "attempted to index 'Health' (a number value)" and I do not know what to do to get rid of this error. Basically I am trying to display the characters health on a local gui.
local player = script.Parent.Parent.Parent.Parent.Parent.Parent
player.Character.Humanoid.Health.Changed:connect(function(health)
script.Parent.Text = health.."%"
end)

3 comments
I just notices you used health as a param. I don't think that is a param. I could be wrong though
it works when I print it, if i say print(player.Character.Humanoid.Health) it will print my health
Try using player.Character.Humanoid.Health then.