Player's Hitbox too big for sliding

Hello! I was trying to make my player slide under some objects when I saw my player’s hitbox is too big. Any way to fix it? (Sorry if it’s the wrong category)
LocalScript:

local UIS = game:GetService("UserInputService")
local char = script.Parent

local slideAnim = Instance.new("Animation")
slideAnim.AnimationId = "rbxassetid://8676154417"

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local keybind = Enum.KeyCode.LeftControl
local canslide = true

local jumped = false

UIS.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.Space then
		jumped = true
	end
end)

UIS.InputEnded:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.Space then
		wait(1.5)
		jumped = false
	end
end)

UIS.InputBegan:Connect(function(input, gameprocessed)
	if gameprocessed then return end
	if not canslide then return end
	if jumped then return end

	if input.KeyCode == keybind then
		if jumped then return end
		canslide = false
		local playAnim = char.Humanoid:LoadAnimation(slideAnim)
		playAnim:Play()

		local slide = Instance.new("BodyVelocity")
		slide.MaxForce = Vector3.new(1,0,1) * 30000
		slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
		slide.Parent = char.HumanoidRootPart

		for count = 1, 8 do
			wait(0.1)
			slide.Velocity *=0.7
		end
		playAnim:Stop()
		slide:Destroy()
		canslide = true
	end
end)

Try put the HumanoidRootPart lower by CFrame or Position

How do you do that?

humanoid.HumanoidRootPart.Position = Vector3.new(0, -1, 0)

I’ve also tried CFrame but both just break my animation

Can you let me see how did it break?
I tried to find the best ways to fix it but i need to see how did it breaks

Uh if you can’t then just try to make the head CanCollide = false and return it back to normal after the sliding is finished

Maybe try lowering the hip hight or use inner hitbox (not sure if that’s the right name)

Similar to your response, I tried head but it did not work. Lucky me I selected my character while in-game and saw that the HumanoidRootPart is still in the idle position, even if my animation plays. To fix that I did

local character = script.Parent
local HRP = character:WaitForChild("HumanoidRootPart")
HRP.CanCollide = false
1 Like