Jump to content

Recommended Posts

@sgoodwin93 Log to help you with crashes.

 

Code.

local function regen(inst, amt)	inst.components.health:DoDelta(amt)	inst.components.sanity:DoDelta(amt)end-- When you attack somethinginst:ListenForEvent("onhitother", function(inst, data) regen(inst, 5) end) -- When you kill somethinginst:ListenForEvent("killed", function(inst, data) regen(inst, 10) end)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...