oh the little red tie is the player's hitbox? If so then yeah it probably is working as you intended. Although when collision boxes are that small and/or quite fast they often don't collide correctly especially if they are overlap collisions instead of block collision so there might be times it is not hitting.