How does character hitbox work?

i was messing around with a sliding animation that my friend made and i thought that the hitbox depends on the humanoidrootpart and hipheight of the character but then i visualized the hrp and printed the hipheight to output and that doesn’t seem to be correct

image

u can see my HRP inside the wall and im moving thru the gap easily.

does this have to do with the rig, hrp, hipheight? what is it? i can’t really seem to find any information how character collision works either so im lost.

theres nothing wrong with the script, im just curious on how character hitboxes work, my friend made an animation and since im able to go through small gaps like that then that means the animation is changing the hitbox somehow,

2 Likes

A hitbox is something that is not already in the player, you must make an invisible part that is unanchored but is welded to HRP. The hitbox essentially deals with any outside part that touches it and then damages that player. In your case, it could be that some of your limbs have CanCollide set to false so that the ground collision doesn’t mess up the animation. You could mess a little with the slide script to change that, but if it isn’t a super big deal then I would advise not to change the script.

i made the script, i didnt set any cancollides to false

theres nothing wrong with the script, im just curious on how character hitboxes work, my friend made an animation and since im able to go through small gaps like that then that means the animation is changing the hitbox somehow,