Hello! So I’m using TweenSize, and for some reason, UDim2 isn’t working as intended. Here’s my code, (Sorry for the terrible formatting, you can edit it if you’d like), can anyone help?
repeat
task.wait(1)
until game:IsLoaded()
local delta_time = 0.04
for i = 1, 100 do
task.wait(delta_time)
local formula = i/100
script.Parent:TweenSize(UDim2.new(0, formula, 0, 25), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.1, false)
if i == 34 then
task.wait(0.04)
script.Parent.Parent.Parent.TextComponents.TextLabel.Text = "🌴 Have you explored all the worlds?"
elseif i == 67 then
task.wait(0.04)
script.Parent.Parent.Parent.TextComponents.TextLabel.Text = "🐠 Join our Discord community!"
elseif i == 91 then
task.wait(0.04)
delta_time = 0.02
script.Parent.Parent.Parent.TextComponents.TextLabel.Text = "🐦 @Cloudbot"
end
end
local tween = game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0), {Position = UDim2.new(0.5, 0, 1.2, 0)})
local tween2 = game:GetService("TweenService"):Create(script.Parent.Parent, TweenInfo.new(0.5, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0), {Position = UDim2.new(0.5, 0, 1.2, 0)})
local t1 = game:GetService("TweenService"):Create(script.Parent.Parent.Parent.TextComponents.TextLabel, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {TextTransparency = 1})
t1:Play()
t1.Completed:Wait()
tween2:Play()
tween:Play()
tween.Completed:Wait()
local t = game:GetService("TweenService"):Create(script.Parent.Parent.Parent, TweenInfo.new(0.6, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0.5), {BackgroundTransparency = 1})
local t2 = game:GetService("TweenService"):Create(script.Parent.Parent.Parent, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0.5), {Position = UDim2.new(0.499, 0, 0.639, 0)})
local t3 = game:GetService("TweenService"):Create(script.Parent.Parent.Parent.ImageLabel, TweenInfo.new(0.7, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0), {Position = UDim2.new(0.5, 0, 1.7, 0)})
t3:Play()
t:Play()
t.Completed:Wait()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
script.Parent.Parent.Parent.Parent:Destroy()
So it looks like I’d work, except for some reason, part 2 of the UDim2 isn’t working and doesn’t error. Let me know if you need any extra info!