What did I do wrong? This script seems to break on line 4.
function Glide(CurrentPos,TargetPos,speed)
if CurrentPos < TargetPos then
return math.min(TargetPos,CurrentPos + speed)
elseif CurrentPos > TargetPos
return math.max(TargetPos,CurrentPos - speed)
else
return TargetPos
end
end
Glide(CurrentPos,TargetPos,speed)

2 comments
It worked Thank you!
Your link can be formatted into link text(: