Fixing Roblox's default Head hitbox?

The default head hitbox is like this. It’s problematic since you can shoot at the side of the head and it would register as a hit:


To fix it I set the shape from block to any of the other 2 options:

Result:

I set this as soon as the character loads. The problem with this method is for different head packages or different r15 head scales. Is there a way to adjust the size to like the default roblox scaling system? You can see in the picture above that the shades accessory does not perfectly fit the head. Is there a better way to fix head hitbox?

Code:

players.PlayerAdded:Connect(function(plr)
	playerTable[plr] = plr.CharacterAppearanceLoaded:Connect(function(character)
		wait()
		character.Head.Shape = Enum.PartType.Ball
		character.Head.Size = Vector3.new(1, 1, 1)
	end)
end)

Edit: I have to change the size manually because setting the head part to a different part shape does this:

2 Likes

Instead of rescaling the head, just put an invisible part over the head and scale to your liking.

You can register any ray casting or touched events from that invisible part over the head.

1 Like

How would you go about putting the actual head into an ignore list?

Do you just do

local list = Players:GetChildren()
for i, v in pairs(list) do 
    table.insert(testTable, v.Character.Head)
end

And what happens if your actual head is twice the size of a normal head? How would you scale the invisible part to match the actual head?

You just grab all the players heads and add them to an ignore list. Probably through a for loop.

Can’t you just set the size of the head to the scale of the mesh?

He wants to reduce the hitbox of the head. Not the size.

The size of the mesh being set as the size of head would likely make it the same scale as the mesh wouldn’t it? The mesh’s size isn’t determined by the part but by its property Scale thus you are just reducing it to be the same size.

Then, if I am not understanding it right, then he wants to make the hitbox even smaller than the actual mesh?

Yes, he wants to make the hitbox smaller than the actual mesh.

Then as @ArtFoundation has said before, just set the scale of the actual part to 1,1,1:

No hacky need for inserting a part to act as the hitbox when you can just resize the head :thinking:
I dont think there is a need to set the part type to ball as well?

Ingame:

Both methods will probably work fine. Your method is probably more efficient though.