Gui not showing health and maxhealth

hello im making a rpg game and im adding a health gui with the current health and max health
but instead it shows only Label


i get this error
image
here is the script

while wait() do
	local plr = game.Players.LocalPlayer
	local char = plr.Character or plr.CharacterAdded:Wait()
	local hum = char:WaitForChild("Humanoid")
	script.Parent.Text = "Health: "..hum.Health "/ "..hum.MaxHealth
end

how do i fix it?

You forgot to encase 2 dots here at the end:

Try this lol

while wait() do
	local plr = game.Players.LocalPlayer
	local char = plr.Character or plr.CharacterAdded:Wait()
	local hum = char:WaitForChild("Humanoid")
	script.Parent.Text = "Health: "..hum.Health.." / "..hum.MaxHealth
end
2 Likes

oh yes , i forgot about it ,that was a silly question ,lol thx

1 Like

We all make silly mistakes so don’t worry about you’re completely fine :sweat_smile:

1 Like