I need to make the character for my game to keep their momentum when moving (to put it in other words, move like they’re on ice), but without altering the physical properties of the map, since there are other players who cannot be affected by it.
I’ve searched far and wide in the devforum but could not find anything that works (changing the character’s PhysicalProperties, putting a part under the player with icy phisical properties, etc.)
I fiddled around with the humanoid but I couldn’t find any way to disable friction so in the end I just settled on calculating the velocity manually
I basically store a velocity value and accumulate velocity based on the character’s movement direction, and multiply it by a number smaller than 1 to apply air drag/damping
local RunService = game:GetService("RunService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local velocity = Vector3.new()
RunService.Stepped:Connect(function()
velocity += humanoid.MoveDirection * 0.4
velocity *= 0.996
humanoidRootPart.Velocity = Vector3.new(velocity.X, humanoidRootPart.Velocity.Y, velocity.Z)
end)