for i, player in pairs(game.Players:GetChildren()) do
if player:FindFirstChild("PlayerGui") then
local plr = player
for i, object in pairs(game.Workspace:GetChildren()) do
if object:FindFirstChild("Humanoid") then
local humanoid = object:FindFirstChild("Humanoid")
if humanoid.Parent.Name == plr.Name then
local healthStatus = plr.PlayerGui.healthGui.healthFrame.healthStatus
healthStatus.Text = humanoid.Health.." / "..humanoid.MaxHealth
end
end
end
end
end
So after lots of different attempts with different approaches, I really thought this one would work but (clearly) it did not, but I can't figure out why?
(Goal of this script is to change the text of healthStatus to whatever the players health is out of their max health)

3 comments
You're code is only running once, unless there is code you haven't included.
Is it a script or a localscript?
It was just a normal script