Hitbox Script -

return HitboxModule

function HitboxModule:OnHit(character, hitPart) -- override for custom logic (sound, vfx, etc.) print( Hit {character.Name} for {self.Damage} damage ) end hitbox script

public void Deactivate() { isActive = false; } return HitboxModule function HitboxModule:OnHit(character

self.Part = hitboxPart self.Damage = damage or 10 self.Owner = owner self.Active = false self.HitCharacters = {} -- track already hit characters owner) local self = setmetatable({}

function HitboxModule.new(hitboxPart, damage, owner) local self = setmetatable({}, {__index = HitboxModule})

local HitboxModule = require(script.Parent.HitboxModule) local swordPart = script.Parent local owner = script.Parent.Parent.Parent -- assume character