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

How do I make a part move downwards until a certain point?

Asked by
ym5a 52
3 years ago
Edited 3 years ago
local ting = game.Workspace.iku.Torso
y = 60.453

repeat
    ting.Position = Vector3.new(39.245, y, -95.047) -- in the air (original position)
    y = 60.453 - 1
until ting.Position == Vector3(39.245, 3.119, -95.047) -- When it hits the baseplate

this is my script so far I execute it but it doesnt do anything help !!

1 answer

Log in to vote
0
Answered by 3 years ago

Since you're being precise, I would've said to implement a wait into that loop. I would also recommend tweening if you're interested in that.

local Tween: Tween = game:GetService("TweenService"):Create(workspace:WaitForChild("iku", math.huge):WaitForChild("Torso", math.huge), TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {
    ["Position"] = Vector3.new(39.245, 3.119, -95.047),
})
Tween.Completed:Connect(function()
    -- You can make something happen when it finished.
end)
Tween:Play()
0
What is Tweening? ym5a 52 — 3y
0
Click tweening to understand more about TweenService's Create method. You can easily transition Instance properties from A to B in any smooth form you choose to do so. TheLuminent 1204 — 3y
0
Yes I am playing with the script you sent ym5a 52 — 3y
Ad

Answer this question