local player = game.Players.LocalPlayer
local find = player.Character:WaitForChild("Humanoid") and player.Character.Humanoid.Health
find.Changed:Connect(function()
script.Parent.Text = find.Value
end)
local Players = game:GetService("Players")
function onPlayerAdded(player)
if find then
script.Parent.Text = find.Value
end
end
Players.PlayerAdded:connect(onPlayerAdded)
for _,player in pairs(Players:GetPlayers()) do
onPlayerAdded(player)
end
Here is my code. Basically what happens is whenever a player resets they get a value of another person in the server, but the value itself does not change, so it is a GUI display issue. I believe it might be because of the player added, but I need it so that the value updates as soon as the player joins.
