This is a local script.
So I have this simple script that changes the text of a textlabel (script.Parent.Frame.HP) to the value which is located at game.ServerStorage.PlayerStats(player's name).HP.Value
This value is a number.
local player = game.Players.LocalPlayer
while true do
wait(.5)
script.Parent.Frame.HP.Text = game.ServerStorage.PlayerStats:FindFirstChild(player.Name).HP.Value
end
For some reason, the script only works in testing mode (F5) where it spawns a character, but it doesn't work on the actual game.

4 comments
line 5 was too big to fit on the page, so it's spread out on two lines. It's not like this on the script.
Local script can't access ServerStorage in online mode for security reasons.
Oh, thanks.
I've changed it to lighting. Works well now, thanks!