Sliding Along Parts on R15 Characters

Hi, in a game I’m working on there’s a weird bug where characters seem to “slide” on parts out of nowhere.

Here are a couple of videos of the bug:

Just some information: characters’ heights are changed by changing the HumanoidHeightScale and HumanoidWidthScale inside the Humanoid.

Does anyone know why this happens? Is it an engine bug? If so, is there any way to avoid it?

3 Likes

This is most probably an issue with your climbing script as it always happens as you land.

Is it really though? The only part of the climbing script that affects physics is me anchoring then unanchoring the HumanoidRootPart and applying a velocity straight up (or at an angle) for the jump effect.

It’s a start, at least. You might want to share the part of the climbing code that has to do with velocities.

			do
				local c = humanoid:LoadAnimation(script.Climb)
				c.Priority = Enum.AnimationPriority.Action
				c:Play(0.3)
				root.Anchored = true
				-- CFrame the root to face the wall
				local lookVector = root.CFrame.lookVector
				wait(0.15)
				root.Anchored = false
				root.Velocity = Vector3.new(0, 65, 0) + lookVector * -30
				wait(0.2)
				return true
			end

I was not get the sliding shown in the video. Do you think another factor could possibly be contributing to the sliding?
I’m not sure if it matters, but I used a .Touched event on a part with a 2 second debounce.

The only other thing that could contribute to the sliding is that I’m changing the Humanoid’s height and width scales.

Could you share what values you used? When I tested, I set both height and width scale to 1.2.

It’s a random value. Between 1.05 and 1.3 I believe.

Just found out that it’s almost 100% not related to my wall climb/jump code. It happens when I simply jump onto a ledge weird.

well, i’m not really sure if this is related, but if you go in-game, and set your hipheight to 0, you get the same effect. could be something with how your root goes into the block.

2 Likes

Is the HumanoidRootPart’s CanCollide Property set to true?

I’m fairly sure that even if you set it to false, it gets automatically set back to true.

But no, I don’t change it anywhere.

I found a semi-fix: Give the humanoid root part high friction, density, mass, and friction weight. This prevents the rapid sliding. The only other thing you could do is increase the hipHright slightly, and you should be fine.

3 Likes