HitboxClass | v1.1B | A Powerful OOP-based Hitbox Module

Hey guys, I am currently using Raycast v4, it works smoothly,

yet I noticed some of you really talked about how good this hitboxclass is.
I am creating an rpg game, do you guys mind sharing a simple roblox sword file with the entire hitboxclass in it like raycast dev did,

this will help me start, much appreciated!

Iā€™m trying to send the table from one module to another where the rest of the script happens but it doesnā€™t work. Iā€™m not sure of the problem.

hitbox creation script:

function HitboxService:init(Player : Player,Sent : {any})
	local Character = Player.Character
	
	local HitboxData = Sent.Hitbox
	local RelativePart = HitboxData.RelativePart
	local initrelativepart = HitboxService:FindRelativePart(Character,RelativePart)
	
	local Size = initrelativepart.Size * Vector3.new(1.5,1.5,1.5)
	local Position = initrelativepart.CFrame
	
	local HitboxParameters = {
		SizeOrPart = Size;
		UseClient = Player;
		DebounceTime = .45;
		Blacklist = {Character};
		InitialPosition = Position;
	} :: HitboxTypes.HitboxParams
	
	local newHitbox,connected = HitboxClass.new(HitboxParameters)
	newHitbox:WeldTo(initrelativepart)
	
	local ReturnTable
	
	newHitbox.HitSomeone:Connect(function(VictimisedCharacters)
		ReturnTable = VictimisedCharacters
	end)
	
	newHitbox:Start()
	
	return ReturnTable
end

where the function is called:

local HitTable = HitboxService:init(Player,CurrentInfo)

also it seems as if my hitbox will not delete despite setting a debounce time

we can have a wally dependence for install on vscode?

1 Like

Does it not support hitting multiple targets?

it does work for hitting multiple targets

+1 for having wally dependence

Hey dude, are you able to add an option where the hitbox can track both objects and players. Then, you can make a parameter that checks if it hits and object or hitModel.

Is there plans for a roblox ts port?

do u know how i could get the hit targets as soon as i spawn the hitbox

i dont know how else to check if my attack missed or not

How do I make a hitbox on the server? I have a script inside ServerScriptService that requires the module on ReplicatedStorage. I managed to make the hitbox appear, but it doesnt stick to the playerā€™s character.

can there be an option for it using specific tags that the player has to do, having to add the character to a folder is a bit tedious

Player tag or something is easier

Oh yeah, Is there a way to modify the size while the hitbox is running yet?

1 Like

Yo, does the dev of this module still look at this forum for new suggesstions b Itā€™s been 4 days.

I have a question. If I use the UseClient option which makes a hitbox track on the client-side, will exploiters be able to manipulate the size of the hitboxes?

If not, then whatā€™s the difference between client and server-sided hitboxes? From what I know, client-sided hitboxes are more accurate, but are more susceptible to exploits, while server-sided hitboxes are less accurate, but are more secure.

You ideally use sanity checks to ensure the hitbox isnā€™t able to go outside of its means.

Thereā€™s no built-in methods for it. You can access the hitbox itself and change the dimensions manually. If itā€™s a client-sided hitbox you need to handle it accordingly by sending over information needed for it to find the correct hitbox to modify.

Itā€™s the same idea, when you add the tag just parent them to the alive folder as well.

To have it stick to the character, use the WeldTo method on their HRP, torso, or wherever you want it to weld to. Thereā€™s an optional offset argument as well.

Iā€™m not read up on TypeScript, and have very little experience with JS, so not for now.