I have a script:
script.Parent.ClickDetector.MouseClick:connect(function() local goal = -125.6, -214.86, -386.6 while script.Parent.Position ~= (goal) do local current = script.Parent.Position.Y local new = current - .2 script.Parent.Position = Vector3.new(-125.6, new, -386.6) wait(.1) end end)
For some reason, instead of slowly moving down, it teleports higher and stays there.
You didn't make goal a Vector3, if you did print(goal) it would return the first value -125.6 what I would recommend is lerp
Here's an example with what you're doing
script.Parent.ClickDetector.MouseClick:Connect(function() local goal = Vector3.new(-125.6, -214.86, -386.6) local start = script.Parent.Position for i = 0, 1, .01 do script.Parent.Position = start:lerp(goal, i) wait() end end)