Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Moving a part onclick to a position smoothly?

Asked by 5 years ago

Hey, so basically I'm trying to move a part when I click a button (its a bunch of parts in a union if thats any help) to a position smoothly.

This is what I have so far:

local button = script.Parent
local track = game.Workspace.Track

function move()
    track.Position = Vector3.new(14.185, 5.485, -34.907)
end

button.ClickDetector.MouseClick:connect(move)

Now this works but it instantly goes to the position and I want it to slowly rise up to the position.

The starting position is:

14.19, 0.219, -34.922

And the pos I need it to raise too is:

14.185, 5.485, -34.907

Thanks for the help!

0
Still need help Amnesilox 0 — 5y

Answer this question