Jump to content

Weapon: Higher dmg to one prefab

Recommended Posts

Well, there are many ways to do it.


local function ApplyExtraDamage(weapon, attacker, target)	if target.prefab == "pigman" then		target.components.health:DoDelta(-2000)	endendAddPrefabPostInit("hambat", function(inst)	inst.components.weapon:SetOnAttack(ApplyExtraDamage)end)
Link to comment
Share on other sites

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...