So, I am trying to add sliding to my action game using LinearVelocity, and I kind of run into a problem where, if I have to describe it, it’s forcefully trying to ram into the walls, instead of just falling to the ground
This is where I set up the velocity:
local MovementVelocity = Instance.new("LinearVelocity")
MovementVelocity.Name = "MovementVelocity"
MovementVelocity.Parent = HRP
MovementVelocity.Attachment0 = MovementAttachment
MovementVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
local CheckValue = HRP.AssemblyMass * 5000
MovementVelocity.ForceLimitsEnabled = true
MovementVelocity.ForceLimitMode = Enum.ForceLimitMode.PerAxis
MovementVelocity.MaxAxesForce = Vector3.new(CheckValue, 0, CheckValue)
and this is the main just in case
local CurrentVelocity = HRP.AssemblyLinearVelocity.Magnitude
SlideConnection = RunService.Heartbeat:Connect(function(dt)
if SlideStrength <= 0 then
WM.StopSlide(Character)
else
Vel.VectorVelocity = Vector3.new(
HRP.CFrame.LookVector.X * SlideStrength,
workspace.Gravity / 2,
HRP.CFrame.LookVector.Z * SlideStrength
)
SlideStrength -= 0.98 * dt
end
end)
Any help is appreciated!