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

How can I make this changing position smoothly?

Hello guys I have a problem with this script. I want to make this smoothly.

local Part = script.Parent.Parent.Handle


script.Parent.Touched:Connect(function(hit)
			Part.Position = Part.Parent.CardDown.Position
			wait(2)
			Part.Position = Part.Parent.CardUp.Position
end)

1 answer

✓ Accepted answer

TweenService

local Part = script.Parent.Parent.Handle
local TS = game:GetService("TweenService")

script.Parent.Touched:Connect(function(hit)
	TS:Create(Part,TweenInfo.new(.5),{Position = Part.Parent.CardDown.Position}):Play()
	wait(2)
	TS:Create(Part,TweenInfo.new(.5),{Position = Part.Parent.CardUp.Position}):Play()
end)

1 comment

0

Thank you :D

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