I used:
local hum = script.Parent:WaitForChild("Humanoid") hum.HealthChanged:Connect(function() hum.Health = hum.MaxHealth end)
I was just wondering if this is the most optimal way of doing this, however it might have some problems such as if it takes more than its MaxHealth which I can fix by just increasing it to a larger number.
Thanks!