Help with tweening a part!

Hi developers!

I’m attempting to tween a part 2 times, one to move up, and after 3 seconds, move to its original position.
The part moves upwards just fine, but after waiting 3 seconds, will not move back down. No errors are being outputted, so I’m a bit confused on what’s exactly going on.

I’ve double checked documentation and looked at past forum posts, but to no avail.

local part = script.Parent
local tweenService = game:GetService('TweenService')
local Position = script.Parent.Position

local originPos = part.OriginPos.Value

local tweenInfo = TweenInfo.new(
	1, 
	Enum.EasingStyle.Bounce,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local goal = {
	Position = part.Position + Vector3.new(0,5,0)
	
}

local goal2 = {
	Position = originPos
}

while true do
	task.wait(3)
	local rise = tweenService:Create(part,tweenInfo,goal)
	rise:Play()
	task.wait(3)
	local fall = tweenService:Create(part,tweenInfo, goal2)
	end

Help would be greatly appreciated!

Have you tried fall:Play()?

local part = script.Parent
local tweenService = game:GetService('TweenService')
local Position = script.Parent.Position

local originPos = part.OriginPos.Value

local tweenInfo = TweenInfo.new(
	1, 
	Enum.EasingStyle.Bounce,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local goal = {
	Position = part.Position + Vector3.new(0,5,0)
	
}

local goal2 = {
	Position = originPos
}

while true do
	task.wait(3)
	local rise = tweenService:Create(part,tweenInfo,goal)
	rise:Play()
	task.wait(3)
	local fall = tweenService:Create(part,tweenInfo, goal2)
	fall:Play()
end
1 Like

Yeah, he hasn’t played the tween…

1 Like

Oh my god, I forgot all about that…

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.