Hitbox Service, easily create Accurate Hitboxes using minimal scripting!

are you putting the .Touched inside of a heartbeat? That usually makes it lags.

If not you can manually check the items using the :GetItems function.

I have some questions I hope you can answer

Is this faster than the new worldroot detection functions? Iā€™m talking about :GetPartsInBoundingBox() and :GetPartsInRadious().

ā†’ If not:
[This question is a little more specific for my game, because Iā€™m used skinned meshes and the setup I have.]
Currently, Iā€™m using :GetPartsInBoundingBox() and checking using a whitelist for Collection service:GetTagged(ā€œHitboxā€). Is this still slower than your fastest method? (Maybe doing the same whitelist check)

ā†’ question:
[Iā€™m sorry if this is answered in the post already]
Iā€™ve seen you have various methods. Can you tell me which is the fastest? Or, how could I make this faster?

ā†’ question:
[Iā€™m not well informed about Zone+ so idk how useful it is]
Thereā€™s a .Touched and .Entered which seem really useful. But if we get into Zones (which is what these seem like), would you recommend using yours over zone+'s ? Of course, itā€™s better the have all in one module, but if I only want to use Zones and not hitboxes, is it still better?

Anyway, seems pretty reliable so Iā€™m counting on this module! After all Iā€™ve been having some delay problems with my hitboxes lately but I thought I couldnā€™t do anything. So Iā€™m glad I found this post!

PD: Iā€™d like answers from the OP and people who have tested it if possible :slightly_smiling_face:

Edit: I just found out the Dev is banned from the forums lol. Sorry to hear that, I couldnā€™t live without devforum tbh. Those who want to make a v2 Iā€™d really appreciate it!

The module itself uses the worldroot detections.

honestly idk

idk this either tbh

iā€™d say theyā€™re both good. But for different purposes. If you want to use zones, iā€™d recommend u use zone +. For hitboxes this module.

1 Like

I will do some benchmarking now some day I guess.

sorry for the bump/self promo but I think itā€™s important.

Iā€™ve recently created a v2 version of the module with the owner himself. It fixes a LOT of the bugs hitboxservice v1 had and adds a lot of features to it. Iā€™d recommend you check it out since this module seems to no longer be maintained.

https://devforum.roblox.com/t/hitbox-service-v2-easily-create-accurate-hitboxes-using-minimal-scripting/1761565

cc: @ElVaranCubico_YT

2 Likes

Uhā€¦ Whereā€™s the page? it throws an error when i clicked.

I deleted it, the module is absolutely useless. Thereā€™s better alternatives.

1 Like

i seeā€¦ Which is more reliable?

How do I make it not hit the player that cast the hitbox and how do I damage multiple players at once plus not damage the player that already got hit?

This crashes Roblox Studio whenever a hitbox using this module touches it.

Sad to see this hitbox module go out like this. Was reading for a good 30 minutes, sad. :frowning:

1 Like

Is this mandatary to create a new hitbox each time for a new check. It feels like it could cause a memory leak. I tried using the same hitbox more than one time and it resulted in no items being returned at all.

The Stop function doesnā€™t seem to work properly.

I used the template code you wrote and itā€™s spamming this error in the output.

local RunService = game:GetService("RunService")
RunService.Heartbeat:Connect(function()

	local HitboxModule = require(game.ReplicatedStorage.HitboxModuleMain)
	local HitBox = HitboxModule:CreateWithRange(script.Parent, script.Parent.Position, 10, OverlapParams.new())
	HitBox:Start() -- starts the hitbox
	if HitBox:GetState() == true then -- checks state
		local Items = HitBox:GetItems()

		wait(1)
		HitBox:Stop() -- stops state
	end
end)


1 Like

What Did You Use To Make The Hitbox?

You could add a function to the hitbox that automatically stops it after a set amount of time, would be very useful. Thanks for the amazing script!