In my game I let players scale their R15 character down to about ~.3 size.
When walking or running around at this size, the humanoid “slides” when stopping or changing directions, almost like the player were on ice and the friction was being set lower than normal.
I’ve tested out manually adjusting the Humanoid’s HipHeight but it looks like the auto-set height after scaling is the ideal height for physics & least amount of sliding. I would love to be able to remove this strange sliding effect! Any help appreciated
Hey, just got allowed to post on here. I found a bandaid fix is to just weld a invisible part too yourself while small. Mine has a default vector force inside it but im unsure if that has anything to do with the workaround.
Interesting… do you have more details? Is this welded invisible part collidable, what’s its size, position, etc?
What do you mean by default vector force? A BodyForce?
A code snippet would be helpful just to see all these details, thanks!
I’ve been using @konlon15’s custom physical properties fix with good results. Barely any players are reporting “sliding” anymore
What I did to fix that issue, I used a bodyVelocity, to force the character go to that direction, controlling the sliding effect with MaxForce.
Let me show you
I don’t apply the force in Y, because the character will start flying.
local BodyVelocity = Instance.new("BodyVelocity", Player.Character.PrimaryPart)
local ControlModule = require(Player:WaitForChild "PlayerScripts" :WaitForChild "PlayerModule" :WaitForChild "ControlModule" )
game:GetService("RunService").RenderStepped:Connect(function()
local MoveVector = ControlModule:GetMoveVector().Magnitude
local MoveDir = script.Parent:FindFirstChildOfClass("Humanoid").MoveDirection
local Hum = script.Parent:FindFirstChildOfClass("Humanoid")
if MoveVector <= 0 then
BodyVelocity.Velocity = Vector3.zero
BodyVelocity.MaxForce = Vector3.new(5,0,5) -- More force means he's going to stop very suddenly
else
local xForce = (Hum.WalkSpeed*MoveDir.X)
local zForce = (Hum.WalkSpeed*MoveDir.Z)
BodyVelocity.MaxForce = Vector3.new(10,0,10) -- The higher it is the more you apply so it won't slide.
BodyVelocity.Velocity = Vector3.new(xForce, 0, zForce)
end
end)
Here’s what it look like in a game with small character that used to slide.
Okay sorry I was wrong, here’s a good script to stop character from sliding:
This one changes your friction and weight. (density)
local Player = game.Players.LocalPlayer
game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(script.Parent:GetDescendants()) do
if v:IsA("BasePart") then
v.CustomPhysicalProperties = PhysicalProperties.new(100, 2, .5, 100, 1)
end
end
end)