TweenService on gui elements wont go to negative?

Hello, I am making an end screen for my game, and I want to slide down the credits.
What I want to do is, tweeting position of frames positive to negative.
But when I try to make it it stuck on 0, and wont go negative.
I searched posts like this but I couldn’t find any posts like this.
Here’s the code:

wait(3)
local EndText = "The End."
for i = 1, #EndText do
	script.Parent.End.Text = string.sub(EndText, 1, i)
	wait(0.05)
end
wait(7)
script.Parent.broiforgotiitlol:Play()
wait(script.Parent.broiforgotiitlol.TimeLength - 9)
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
TweenService:Create(script.Parent.End, Info, {TextTransparency = 1}):Play()
local Info2 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
TweenService:Create(script.Parent.Frame, Info2, {Position = UDim2.new(script.Parent.Frame.Position.X,0,-1),}):Play()
wait(8)
TweenService:Create(script.Parent.Frame2, Info2, {Position = UDim2.new(script.Parent.Frame2.Position.X,0,-1),}):Play()
wait(8)
TweenService:Create(script.Parent.Frame3, Info2, {Position = UDim2.new(script.Parent.Frame3.Position.X,0,-1),}):Play()

any help is appreciated! :heartbeat:

Are they GUI frames your tweening? Just curious - why not use TweenPosition instead?

You only have 3 values assigned and UDim2 uses 4. Example : UDim2.new(0, 0.5, 0, 0.5) and also when you say Obj.Position.X i suggest adding .Scale or .Offset (depending on what you’re using) to not error your code.

You also have a nonsense comma at the end of your UDim2 that you’re not using, I doubt that errors anything though

I did both :TweenPosition and TweenService, they both work but they stop when y position comes to 0.

Okay so, I’ve changed Position.X to this

wait(3)
local EndText = "The End."
for i = 1, #EndText do
	script.Parent.End.Text = string.sub(EndText, 1, i)
	wait(0.05)
end
wait(7)
script.Parent.broiforgotiitlol:Play()
wait(script.Parent.broiforgotiitlol.TimeLength - 9)
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
TweenService:Create(script.Parent.End, Info, {TextTransparency = 1}):Play()
local Info2 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
TweenService:Create(script.Parent.Frame, Info2, {Position = UDim2.new(0.109, 0,0,-1),}):Play()
wait(8)
TweenService:Create(script.Parent.Frame2, Info2, {Position = UDim2.new(0.109, 0,0,-1),}):Play()
wait(8)
TweenService:Create(script.Parent.Frame3, Info2, {Position = UDim2.new(0.109, 0,0,-1),}):Play()

but they still stop working when it comes to 0.

I just tried the following:

script.Parent.Frame:TweenPosition(UDim2.new(0.109, 0,-1,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 2, true)

and it worked as expected. Didn’t quite work when I set -1 for Offset in the UDim2 but works fine when set in the Scale instead

1 Like

Oh god, I tried scale and it didnt work, but when i did for both offset and scale it did work, thanks!

1 Like