Hi, I am currently trying to make a slide system, but I am having problems making the LinearVelocity gradually reduce as there is no significant increase in the speed of the humanoidRootPart, if there is a much better way to do this please let me know.
I tried to reduce the speed of the LinearVelocity with a for loop. This causes me a lot of problems because it reduces all velocities including the Y velocity which is the one that helps with the gravity effect.
I know it can be done with a for loop but I don’t know how to do it properly.
Here is the code:
local vf = Instance.new("LinearVelocity",rp)
local att = Instance.new("Attachment",rp)
att.Name = "slideAtt"
vf.Attachment0 = att
vf.VectorVelocity = rp.Velocity.Magnitude * 1.2 * rp.CFrame.LookVector + Vector3.new(0,-30,0)
while var.pressingC do
print(vf.VectorVelocity)
warn(rp.Velocity.Magnitude)
gyro.CFrame = CFrame.new(rp.Position, rp.Position + Vector3.new(Camera.CFrame.LookVector.X,0,Camera.CFrame.LookVector.Z))
task.wait()
end