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