This hitbox module uses Spatial Query!
Can be used on SERVER and CLIENT
I got bored and decided to make this module with simple functions such as enabling and disabling the hitbox, a touched event, and whether the hitbox is able to be seen
This is for people like me who don’t like all the complexity of other hitbox modules
Example script:
local hitboxmodule = require(hitboxmodule)
local hitbox = hitboxmodule:CreateHitbox(part) --creates hitbox
hitbox.ShowHitbox = true --if hitbox is shown or not (for testing purposes)
hitbox.Touched:Connect(function(parts) --fires if atleast one object is touching the hitbox and it is enabled
print(hitbox.Running) --if the hitbox is currently running
print(parts) --parts that hitbox is touching
end)
hitbox.Enable() --enables hitbox
hitbox.Disable() --disables hitbox
(what ShowHitbox set to true looks like on a normal part)
If you use this thank you and I hoped it helped you out!
Would you use or did you find this helpful?
- Yes
- No
0 voters