Ui Tweening Support Needed! PLEASE!

Problem
The script is functioning, but it’s not making any sense.

My frames aren’t going to the y position they’re supposed to go
and after the tween goes up, it won’t return back to it’s original spot.

I put prints in my script and output will print the letter and position of the letter
but then in game it will just be {0,0,0,0}. I’m getting no errors!

My Entire Script

local AnimateFrame = script.Parent.Animate

local debounce = true

local function AnimateText()

	local TextCharacters = AnimateFrame:GetChildren()

	for _,Letter in pairs(TextCharacters) do
		if Letter:IsA("TextLabel") then

			local LetterPOS = Letter.Position
			local LetterXPOS = Letter.Position.X

			if debounce == true then
				Letter:TweenPosition(UDim2.new(LetterXPOS,0.9,0, "Out","Bounce",0.05)) -- changing position
				wait(1)
				Letter:TweenPosition(UDim2.new(LetterPOS, "Out","Bounce") -- original position
			end
		end
	end
end

AnimateText()
--- PLEASE MAKE 
 -- THE PAIN STOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPPPPPPPPP

The Issue

Summary
I’m not sure why this is happening, I did put a delay because I do know that tweens will
sometimes break without them. Overall the help is needed, I have search for other solutions, but kept running into the same problem. I’ve been at this for hours, I wanna go outside!

Your UDim2 values are not set up correctly. You are passing “Out”, “Bounce”, 0.05 to the UDim2.new function. You are also missing a right parenthesis on the second TweenPosition statement which you probably mean for it to be after LetterPOS.

Give this a try:

Letter:TweenPosition(UDim2.new(LetterXPOS,UDim.new(0.9,0)), "Out","Bounce",0.05) -- changing position
wait(1)
Letter:TweenPosition(LetterPOS, "Out","Bounce") -- original position
1 Like

I can’t believe the solution was that simple, usually how it turns out. THANK YOU HONESTLY!

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