Sliding System Help

Does anyone know why my sliding system is doing this?

Heres the script (slide speed is 75 btw)

local function onTouched(other)
	local character = other.Parent
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	
	if humanoid and humanoid.FloorMaterial ~= Enum.Material.Air then
		isSliding = true
		--humanoid.PlatformStand = true
		--slideSound:Play()

		local torso = character:FindFirstChild("HumanoidRootPart")

		-- Only apply the BodyVelocity once when the player first starts sliding
		if not torso:FindFirstChild("SlideBodyVelocity") then
			loadslideanim:Play()
			
			local slideDirection = slidePart.CFrame.LookVector
			local bodyVelocity = Instance.new("BodyVelocity", torso)
			bodyVelocity.Name = "SlideBodyVelocity"
			bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
			bodyVelocity.Velocity = slideDirection * slideSpeed
		end
	end
end

slidePart.Touched:Connect(onTouched)

Does this issue only happen when going down a slope?

nope, its just like that. I dont know how to fix it

Probably is this line because of the LookVector

what would i do then? because if i remove lookvector it gives me an error

okay i fixed it a little but now it does this…

Heres the script:

-- Function to start the sliding behavior when the player touches the slide part
local function onTouched(other)
	local character = other.Parent
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	
	if humanoid and humanoid.FloorMaterial ~= Enum.Material.Air then
		isSliding = true
		--humanoid.PlatformStand = true
		--slideSound:Play()

		local torso = character:FindFirstChild("HumanoidRootPart")

		-- Only apply the BodyVelocity once when the player first starts sliding
		if not torso:FindFirstChild("SlideBodyVelocity") then
			loadslideanim:Play()
			
			local slideDirection = slidePart.CFrame.LookVector
			local bodyVelocity = Instance.new("BodyVelocity", torso)
			bodyVelocity.Name = "SlideBodyVelocity"
			bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
			bodyVelocity.Velocity = torso.CFrame.lookVector * slideSpeed
		end
	end
end

slidePart.Touched:Connect(onTouched)

Could it be the BodyVelocity being applied to humanoidrootpart, so a constant velocity is applied, causing the player to jump?

I don’t know if that’s supposed to happen but i mean bodyVelocity can be causing that to happen

In your second script your setting the velocity property of body velocity equal to lookvector of humanoidrootpart multiplied by slide speed. Maybe set velocity of body velocity equal to lookvector of the part your slideing on multiplied by the slide speed?

Im sorry if this sounds confusing.

how would that look like? Im a little confused lol :sweat_smile:

ohh thats what i did in the first script. it wasnt working

what about setting the friction lower? You can do this by selecting a part, going to properties, then going to part, checking CustomPhysicalProperties, then setting friction to desired amount

still doesnt work sadly, but thanks for all ur help man

Perhaps the running/climbing animations interfere with the slideing animation when interacting with the slope. Not experienced in animations just a guess.

I not really sure what is going on but maybe try using Vector Force instead of Body Velocity.