Enhanced HitboxClass v2.0 - Next-Gen Spatial Detection System
A modern, feature-rich hitbox system that outperforms existing solutions with cleaner code and advanced capabilities.
Get the module here: Hitbox Module
Test Pace: Hitbox Module - Roblox
Key Features
Multiple Hitbox Types
- Box/Ball: Instant single-frame detection
- TimedBox/TimedBall: Repeated detection over duration
- WeldedBox/WeldedBall: Continuously follows moving parts
- Magnitude: Pure distance-based detection
- InPart: Precise part-based collision
- Cylinder: Cylindrical detection areas
Advanced Hit Modes
- Weak: One hit per character (default)
- Strong: Multiple hits per character
- Cooldown: Hit once, then cooldown period
Smart Features
- Velocity Prediction: Compensates for fast-moving targets
- Directional Filtering: Hit only targets in specific directions
- Proportional Sizing: Auto-scale hitboxes based on part size
- Granular Blacklisting: Exclude specific characters AND parts
- Performance Monitoring: Built-in cleanup utilities
Usage Example
local HitboxClass = require(path.to.HitboxClass)
-- Create a sword hitbox that follows the weapon
local hitbox = HitboxClass.new("WeldedBox", {
root = sword,
size = Vector3.new(4, 1, 6),
duration = 0.3,
velocityPrediction = true,
dotProductFilter = {
dotProduct = 0.3,
referenceVector = sword.CFrame.LookVector,
sourcePosition = sword.Position
},
hitboxId = "sword_" .. player.UserId,
HitMode = "Weak",
debug = true
})
hitbox.OnHit:Connect(function(character, hitPart)
print("Hit:", character.Name)
end)
hitbox:Start()
Clean Architecture
- Modular Design: Separated spatial queries into dedicated module
- Type Safety: Full Luau type annotations
- Memory Efficient: Lightweight registry system vs heavy caching
- Self-Contained: No external dependencies or complex setup
Why Choose This Over Alternatives?
- Simpler API: Intuitive hitbox type system vs confusing parameter combinations
- Better Performance: Server-side focused, no unnecessary client-server complexity
- More Features: Velocity prediction, directional filtering, proportional sizing
- Cleaner Code: 603 well-organized lines vs 893+ tangled lines in alternatives
- Better Error Handling: Graceful warnings vs game-crashing asserts
What’s Included
HitboxClass.lua- Main hitbox systemSpatialHitbox.lua- Spatial query utilitiesGoodSignal.lua- Optimized signal implementation
Easy Integration
Just require the module and start creating hitboxes. No complex setup, no external configurations needed.
Perfect For
- Combat systems
- Projectile detection
- Area-of-effect abilities
- Interaction zones
- Trigger volumes
Download now and experience the difference clean, modern code makes!
Get the module here: Hitbox Module
Test Pace: Hitbox Module - Roblox
Tested extensively in production environments. Open source and free to use.


