Hello. I wrote a script to scroll the mouse wheel. He changes the distance. I would like to know how I can make it scroll smoothly.
uis.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseWheel then
if input.Position.Z > 0 then
distance = math.max(distance-2,10) --This won’t get below 5
else
distance = math.min(distance+2,60) --This won’t go above than 15
end
end
end)