Player = script.Parent.Parent.Parent.Parent.Parent if Player:FindFirstChild("Health") == nil then Health = script.Health:Clone() Health.Parent = Player Health.Value = Player.Character.Humanoid.Health.Value end script.Parent.Main.Disabled = false
Is there a way for me to make the number value[Health] = to the players actual health no matter what it is?
Add a changed function, so whenever the Humanoid's health is changed, it will update to the number value.
Player = script.Parent.Parent.Parent.Parent.Parent HealthValue = Instance.new("NumberValue", Player) HealthValue.Name = "Health" HealthValue.Value = Player.Character.Humanoid.Health.Value function HealthOnChange() local Health = Player:WaitForChild("Health") local Humanoid = Player.Character.Humanoid Health.Value = Humanoid.Health end script.Parent.Main.Disabled = false Player.Humanoid.Changed:connect(HealthOnChange)