Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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()

3 comments

0

What is Tweening?

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.

0

Yes I am playing with the script you sent

This discussion is preserved as it was. New answers, comments, and votes are closed.