EZ Hitbox - Hitbox made easy

UPADATE V5.0.0

Removed Setup Requirements

  • No more HitboxSettings folder in ReplicatedStorage
  • No more Alive Folder to manually parent characters into
  • No more Ignore Folder configuration
  • No more NumberValue for velocity constant

New Simplified API

Factory methods for common use cases:

-- Sphere hitbox
local hit = Hitbox.sphere(10, CFrame.new(0, 5, 0))

-- Box hitbox
local hit = Hitbox.box(Vector3.new(10, 5, 10), CFrame.new(0, 5, 0))

-- From existing part
local hit = Hitbox.fromPart(workspace.MyHitboxPart)

Full constructor with sensible defaults:

local hit = Hitbox.new({
    Size = Vector3.new(10, 10, 10),  -- Only required field
    CFrame = CFrame.new(0, 5, 0),    -- Optional, defaults to origin
    DebounceTime = 0.5,              -- Optional
    Lifetime = 5,                     -- Auto-destroy after 5 seconds
    Debug = true,                     -- Show visualization
    AutoStart = true,                 -- Start immediately
    Tag = "Enemy",                    -- Optional CollectionService tag filter
})

Legacy Support

The old parameter names (SizeOrPart, InitialCframe, LifeTime) are still supported for backwards compatibility but are deprecated.

Technical Improvements

  1. Removed Timer dependency - Uses task.delay instead of polling Timer
  2. Auto-detects characters - Scans workspace for Humanoids automatically
  3. Optional tag filtering - Use Tag parameter to filter by CollectionService tags
  4. Backward compatible - Still supports SizeOrPart and InitialCframe (deprecated)
1 Like

Why is :FindHitbox() depreciated?

i dont think that was ever a method

Hello! There is currently a bug where the _GeneratePart() method is called before self.CFrame is set. I made a pull request on Github, please check it out!

1 Like

thanks! just merged it in
mustbethirtycharacters