Line isn't running

local ReplicatedFirst = game:GetService('ReplicatedFirst') 
local ContentProvider = game:GetService("ContentProvider") 

local Assets = game:GetDescendants() 

local UI1 = script.LoadingScreen:Clone() 

local Player = game.Players.LocalPlayer 
local PlayerGui = Player:WaitForChild("PlayerGui") 

ReplicatedFirst:RemoveDefaultLoadingScreen() 

repeat wait() until game:IsLoaded() 

UI1.Parent = PlayerGui 

for i = 1, #Assets do 
	local asset = Assets[i]

	ContentProvider:PreloadAsync({asset}) 
	UI1.Frame.Loading.Text = "Loading: "..asset.Name.." ["..i.."/"..#Assets.."]"
end

UI1.Frame.Loading.Text = "Game Loaded!"
UI1.Frame:TweenPosition(UDim2.new({0, 0},{-1, 0}),Enum.EasingDirection.In,Enum.EasingStyle.Cubic,3)
print("Ran")

The TweenPosition line isn’t running, it’s getting skipped to the Print(“Ran”) line. Any idea why this may be happening?

Try this:

UI1.Frame:TweenPosition(UDim2.new(0, 0,-1, 0),Enum.EasingDirection.In,Enum.EasingStyle.Cubic,3)

It goes away now but has no animation.

Slow down the time so use maybe 6 seconds instead of 3, or change your easing style and test.

Ahh, I figured out the animation portion. Thanks!!

1 Like