Character bouncing off slopes

I’m having a weird problem where if you ever wanted to run up a slope at high speed, it would somehow bounce you off.

What I want to do is make the character run up slope smoothly and stop this weird thing that if you try to jump while running up slope, it stops you and bounce you off.

As you know, Speed Run 4: was able to accomplish this by using HipHeight, BodyForce & BodyGyro inside of a “Intense Custom Physics Script”

I’ve tried coding it but I honestly have no clue how they was able to make this. Any ideas on how it was coded?

Btw Here’s my current script:

local char = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait()
local Torso, rootPart = char:WaitForChild("Torso"), char:WaitForChild("HumanoidRootPart")
local params =
local Humanoid = char.Humanoid
params.FilterDescendantsInstances = {char}
params.FilterType = Enum.RaycastFilterType.Blacklist

	local direction = char.PrimaryPart.CFrame.LookVector*10 -- The direction that character is moving
	char.PrimaryPart.Velocity += direction
	local ray = workspace:Raycast(rootPart.Position,, -Humanoid.HipHeight - 1.8, 0), params) -- Checking if it's (char) running up slope
	if ray then
		local bodyForce ="BodyForce")
		bodyForce.Parent = rootPart
		bodyForce.Force =,game.Workspace.Gravity*rootPart:GetMass(),0)
		Humanoid.HipHeight = 4.86 -- Making the character go up faster
		Humanoid.HipHeight = 0