• Health regeneration
    1 replies, posted
Hi, i would like to make a Health regeneration for a Team in my server but i dont know how to do. Can someone help me ? Thanks.
It would be the opposite of damage over time / bleed of which I wrote an example: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/takedamageinfo_example.lua.html[/url] Although, Dealing damage is more difficult that giving health. Giving health you don't need to worry about killing the player if <= 0 ( which is why using TakeDamage/TakeDamageInfo is used in the example. Giving health is as easy as: Player:SetHealth( math.Clamp( Player:Health( ) + 1, 0, Player( ):GetMaxHealth( ) ) ); -- to give 1 health point and ensuring it doesn't go over maximum.
Sorry, you need to Log In to post a reply to this thread.