Based on your explanation your hierarchy is like this?
StarterGui
Frame
TextLabel
Script
Well your first obvious problem is that the Frame is not inside a ScreenGui instance. All GUI object must be inside a ScreenGui is order to be shown. Second, the Script should be a LocalScript, because it's the descendant of a player.
Other than that, I don't see anything wrong with your script, syntax speaking. There are, however, ways you could make it more readable and more efficient and less glitchy - some of which may be the reason the code is not working.
For example, make your variables local. It's also normally considered the preferred style to make variables lowercase, so that they are more easily distinguished from methods, properties, etc.
Also since you already have a Player variable defined, there is no need to parent all the way up to the player a second time for Character. You need to make sure that the character is loaded, however, before creating the variable, to prevent errors.
Instead of a while loop, it would be better to use the HealthChanged event of Humanoid.
local player = script.Parent.Parent.Parent.Parent.Parent
repeat wait() until player.Character
local character = player.Character
character.Humanoid.HealthChanged:connect(function()
script.Parent.Text = character.Humanoid.Health
end)
2 comments
Right, and will this be in the StarterGUI or should I clone it into the PlayerGUI?
Depends on what your purpose is. StarterGui is probably sufficient for a health GUI.