I don't really need the sliding itself but to get the point2 on the line which is .2 studs far from point1, so I wrote this code:
local Pos2 = Vector3.new(Pos1 + (Direction.unit * .2))
where Direction is lookVector, so I need Pos2 to be on Direction line .2 studs far away from Pos1 but in the code above the output returns Pos2 as (0,0,0)
Use TweenService for this:
local TweenService = game:GetService("TweenService") local part = workspace.Part -- The object local goal = {} goal.Position = Vector3.new(10, 10, 0) -- Position local tweenInfo = TweenInfo.new(5) -- Time in seconds it will take local tween = TweenService:Create(part, tweenInfo, goal) tween:Play()