ImageLabel doesn't change

Hello. I want the ImageLabel1 to disappear whenever percentage reaches 50. Due to reasons currently unknown to me, it does not. Even though both of my debug statements appear on the output console perfectly. Any ideas?
image

local StarterGui = game:GetService("StarterGui")
local TextChatService = game:GetService("TextChatService")











local replicatedFirst = game:GetService("ReplicatedFirst")
local contentProvider = game:GetService("ContentProvider")
local tweenService = game:GetService("TweenService")
local players = game:GetService("Players")
local Digia = game.ReplicatedFirst.LoadingScreenScript.Digia
local image1 = game.ReplicatedFirst.LoadingScreenScript.LoadingScreen.Background.BarBackground.ImageLabel1

local player = players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local loadingScreen = script:WaitForChild("LoadingScreen")
replicatedFirst:RemoveDefaultLoadingScreen()
repeat task.wait() until game:IsLoaded()

local assets = game:GetDescendants()
local cloanedLoadingScreen = loadingScreen:Clone()
cloanedLoadingScreen.Parent = playerGui
local shutdown = 1
for i = 1, #assets do
	local asset = assets[i]
	local percentage = math.round(i/ #assets * 100)
	contentProvider:PreloadAsync({asset})
	
	cloanedLoadingScreen.Background.DisplayPercentage.Text = percentage.."%"
	cloanedLoadingScreen.Background.DisplayAssetsLoaded.Text = "Assets Loaded "..i.."/"..#assets
	
	tweenService:Create(cloanedLoadingScreen.Background.BarBackground.Bar, TweenInfo.new(0.2,Enum.EasingStyle.Sine, Enum.EasingDirection.Out),{Size = UDim2.fromScale(percentage/100,1)}):Play()
	
	
	

print(percentage)
	
	
	if i > 5 then
		Digia.Playing = true
	end

	
	if i % 5 == 0 then
		task.wait()
	end
	
	if i == #assets then
		task.wait(1)
	end
	
	if percentage == 50 then
		print(image1)
		image1.ImageTransparency = 1
		print("50 detected")
	end
	
end

for i,v in pairs(cloanedLoadingScreen:GetDescendants()) do
	if v:IsA("Frame") then
		tweenService:Create(v, TweenInfo.new(0.5),{BackgroundTransparency = 1}):Play()
	elseif v:IsA("TextLabel") then
		tweenService:Create(v, TweenInfo.new(0.5),{TextTransparency = 1}):Play()
	elseif v:IsA("ImageLabel") then
		tweenService:Create(v, TweenInfo.new(0.5),{BackgroundTransparency = 1}):Play()
		tweenService:Create(v, TweenInfo.new(0.5),{ImageTransparency = 1}):Play()
	end
end



	while Digia.Volume > 0 do
		Digia.Volume = Digia.Volume - 0.01
		task.wait(0.1)
end

Digia.Playing(false)

I needed to update image1 to reference the cloned LoadingScreen

local image1 = cloanedLoadingScreen.Background.BarBackground.ImageLabel1

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