Hi! Right now I was making a game, with small NPCs just to be some little figures so it doesn’t make the game too desert, but when he trys to movement the figure slides on the floor, gets faster, and the body parts get too glitchy, like this.
(Sorry for small lags)
Is there a way that I can fix this?
Mess around with the CustomPhysicalProperties of every limb. Making it heavier or with more friction should remove that sliding mess when the character is super small.
local Humanoid = script.Parent.Humanoid
local walkpoints = script.Parent.walkpoints:GetChildren()
local db = false
function movement()
if db == false then
db = true
local randPart = walkpoints[math.random(1,#walkpoints)]
Humanoid:MoveTo(randPart.Position)
Humanoid.MoveToFinished:Wait()
wait(0.2)
db = false
end
end
while wait() do
if db == false then
movement()
end
end
The issue is just a result of the character being so light and having low friction. Increasing the friction or weight on each limb should fix the problem.
For some reason in new versions of roblox studio when ungrouping a model and group it again the error is fixed, this comes from the Scale property, that maybe the humanoid has it as an attribute for the acceleration, Try that!
I had the same issue with my scaled down characters sliding around and acting strangely. I managed to fix it by adjusting the density of each non-massless BasePart in the character model:
lua
local function adjustPhysicsProperties(character, scaleFactor)
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") and not part.Massless then
local properties = part.CustomPhysicalProperties or PhysicalProperties.new(part.Material)
local newDensity = properties.Density / (math.pow(scaleFactor, 3))
part.CustomPhysicalProperties = PhysicalProperties.new(
newDensity,
properties.Friction,
properties.Elasticity,
properties.FrictionWeight,
properties.ElasticityWeight
)
end
end
end
The scaleFactor is basically how much you’ve shrunk or enlarged your character compared to a normal-sized humanoid. For example, if you scaled your character to half its original size, the scaleFactor would be 0.5. This code adjusts their weight according to their new size, making movements look more natural.