Client-Sided Hitboxes Vs. Overlap Params Server-Side Hitboxes?

I am creating a fighting game that for the most part besides a few moves (Projectile and ranged based attacks) uses Client-Sided Hitboxes for responsiveness. (Yes, I do have anti-exploiting measures to prevent range exploits and such.) The problem with using these hitboxes is that I have to use two different scripts, the swinging, and the hitting script (The swinging remote/script is so animations and swinging sounds function globally, and the hitting one is pretty obvious, for the hitbox action.), and I’ve grown to dislike the way these scripts are setup so I’ve thought about implementing workspace:GetPartBoundsInBox/Overlap Params hitboxes into my game to organize the game and make it easier to manage. Would this affect responsiveness in a negative way and make hitboxes inconsistent since they are ran globally on the server rather than on your own client?

You’re better off using something like the Raycast hitbox system, the Attachments will be in the same general location (accounting for replication desync)

These are very inefficient to use as a hitbox system from what I remember, so I generally advise against using them, another option you could do is creating an arbitrary radius check, which can check the radius of your point of interest to parts you plan on hitting.

--[[

A radius check that will search through 
every humanoid in the scene if they are within a radius of a position

]]--

function radiusCheck(position: Vector3, radius: number)
	local hit = {}

	for _,v in pairs(workspace:GetDescendants()) do
		if v:IsA("Humanoid") then
			local root = v.Parent
			for _,p in pairs(root:GetChildren()) do
				if p:IsA("BasePart") then
					if (p.Position - position).Magnitude <= radius then
						table.insert(hit, root)
						break
					end
				end
			end
		end
	end
	
	return hit
end

2 Likes

Really? I’ve used these type of hitboxes in said game and in different games multiple times and they work pretty much flawlessly. I was only really wondering if switching to them would impact the feel of the game.
(I’ve already decided I’m going to keep the client hitboxes for the sake of the game’s responsiveness.)