How to detect if any characters head size has changed?

Hello everyone,

I am in the process of creating a sort of anti-hitbox system that relies on detecting if a character has a modified body part (e.g extremely large head) but I am unsure on how to do this.

I would also like to detect if the player has a large box inside their character that is acting as a body part as I have seen this exploit done in game.

Sorry if this doesn’t make sense, its hard to explain but I will attach some images below of what I am talking about.

Large box acting as body part:

Large head:

You cannot detect this as any such detection is avoidable.

How do games avoid HBE (hitbox expansion) then?

For large head, maybe see the normal size and check if the head size is greater than the normal or like there are some values for adjusting size, so check them

By not checking hits on the client. Alternatively, they can use a combination of checking on the client and conservative re-checking on the server. This is more responsive at the cost of being slightly less reliable, so it usually errs on the side of allowing a hit.

Easy. Inside the humanoid there is a head scale value.
do this HeadScale.Changed:Connect(function(SizeChange)

This will not work as I (were I trying to cheat), could just delete this code or replace it with code that doesn nothing.

You can use this script to do this. Put the script in ServerScriptService. Any server script in this location can not be hacked nor changed nor viewed.

Here is the script. Put it in ServerScriptService then it should work.

		player:Kick("Goodbye hacker.")

This will not work because changing the size on the client will not be visible to the server.

So what if it’s changed on the client? Only they can see it . It won’t affect others gameplay.

You can literally show this doesn’t work in two seconds by trying to scale your own head in studio. By default those changes are applied on the client only, and it wont work.

It will if the hit detection is done on the client, which is what OP is talking about, and is also what the exploit they mentioned takes advantage of.

Changing head scale on the client doesn’t even work.

Can you stop making stuff up and go do something else?

I hate anti-exploit speculation threads like this because people like you will come along and just guess wildly. Then nobody will prove you wrong because it takes zero effort to make stuff up and it takes a lot of effort to actually test what you’re saying, so most people don’t bother. You’re also going one step further and ignoring the context that OP gave about a real exploit that DOES work in order to double down on the thing you made up originally.

What I would do is probably get some sort of local script that is connected to the Player’s Character/In the StarterCharacterScripts. it would be something like this.

Player = game.Players.LocalPlayer
Character = Player.Character or script.Parent
Humanoid = Character:WaitForChild("Humanoid")
HeadScaleValue = Humanoid:WaitForChild("HeadScale")

	if HeadScaleValue.Value > 1 then

Client sided local scripts are frowned upon for anticheats because exploiters can just delete that code, rendering it entirely useless.
The rule is simple: Always trust the server, never trust the client.
You could try and set this up in ServerScriptService.

1 Like

How would I do this for all players without putting it on the client? Client cannot be trusted at all.

This would need to bein side a while true do loop because when the player joins they will have normal sizes.

I would say the best way is to use the player’s maximum height and width to determine if it’s a normal size or not. You could then check this with a simple if statement.
if(player.height > maxHeight || player.width > maxWidth) {
System.out.println(“Player’s bodyparts have been modified!”);