Simple to use hitbox module!

This hitbox module uses Spatial Query!
Can be used on SERVER and CLIENT

Link

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

image
(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

3 Likes

Hey!

This looks super cool! I would implement this into my game!

Perfect timing because I am actually creating a Granny-styled game, and this would work perfectly!

Thanks :smiley:

3 Likes