When I change the image ID it makes it invisible?

I know its this line but when I do it, it makes the image invisible

	AddLoadScreen.GameLogo.Image = "rbxassetid://11781263994"

ImageTransparency

1 Like

i have a function that makes it fade in and out

1 Like

Ill send you the whole code and the module script

1 Like
local function StatusText()
		local TXT = AddLoadScreen.Container.StatusLabel
		local a = 0
		
		while true do
			task.spawn(function()
				print(AddLoadScreen.GameLogo.Image)
				AddLoadScreen.GameLogo.Image = "rbxassetid://11781263994"
				print(AddLoadScreen.GameLogo.Image)
				Fade.FadeIn(AddLoadScreen.GameLogo, 0.25)
				wait(0.25)
			end)
			--------------------------------------
			repeat a += 1
				TXT.Text = "Loading Replicated First."
				wait(0.5)
				TXT.Text = "Loading Replicated First.."
				wait(0.5)
				TXT.Text = "Loading Replicated First..."
				wait(0.5)
			until a == 2
			
			--------------------------------
			task.spawn(function()
				Fade.FadeOut(AddLoadScreen.GameLogo, 0.25)
				wait(0.25)
				print(AddLoadScreen.GameLogo.Image)
			AddLoadScreen.GameLogo.Image = "rbxassetid://11781262869"
				Fade.FadeIn(AddLoadScreen.GameLogo, 0.25)
				wait(0.25)
				print(AddLoadScreen.GameLogo.Image)
			end)
			
			a = 0
			--------------------------------
			repeat a += 1
			TXT.Text = "Loading Workspace."
			wait(0.5)
			TXT.Text = "Loading Workspace.."
			wait(0.5)
			TXT.Text = "Loading Workspace..."
			wait(0.5)
			until a == 2
			---------------------------------------------
			local a = 0
			task.spawn(function()
				Fade.FadeOut(AddLoadScreen.GameLogo, 0.25)
				wait(0.25)
			AddLoadScreen.GameLogo.Image = "rbxassetid://11781260753"
				Fade.FadeIn(AddLoadScreen.GameLogo, 0.5)
				wait(0.25)
			end)
			------------------------------------------------
			repeat a += 1
				TXT.Text = "Loading Replicated Storage."
				wait(0.5)
				TXT.Text = "Loading Replicated Storage.."
				wait(0.5)
				TXT.Text = "Loading Replicated Storage..."
				wait(0.5)
			until a == 2
			-------------------------------------------------
			Fade.FadeOut(AddLoadScreen.GameLogo, 0.25)
			wait(0.25)
			break
			
			end

	end
``` ^the local script

```lua
local module = {}

local TweenService = game:GetService("TweenService")

local function GetProperty(Object)
	if Object:IsA("TextLabel") or Object:IsA("TextBox") then
		return "TextTransparency"
	elseif Object:IsA("ViewportFrame") or Object:IsA("ImageButton") or Object:IsA("ImageLabel") then
		return "ImageTransparency"
	elseif Object:IsA("Frame") or Object:IsA("ScrollingFrame") or Object:IsA("TextButton") then
		return "BackgroundTransparency"
	end
end

function module.FadeIn(Object, FadeTime)
	local TI = TweenInfo.new(FadeTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local Table = Object:GetDescendants()
	Table[#Table + 1] = Object
	for i,v in pairs(Table) do
		local Property = GetProperty(v)

		if Property then
			if v:FindFirstChild("DefaultTransparencyValue") then
				TweenService:Create(v, TI, {[Property] = v:FindFirstChild("DefaultTransparencyValue").Value}):Play()
			else
				local DefaultTransparencyValue = Instance.new("NumberValue")
				DefaultTransparencyValue.Name = "DefaultTransparencyValue"
				DefaultTransparencyValue.Value = v[Property]
				DefaultTransparencyValue.Parent = v

				v[Property] = 1
				TweenService:Create(v, TI, {[Property] = v:FindFirstChild("DefaultTransparencyValue").Value}):Play()
			end
		end
		Property = nil
	end
	TI = nil
	Table = nil
end

function module.FadeOut(Object, FadeTime)
	local TI = TweenInfo.new(FadeTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local Table = Object:GetDescendants()
	Table[#Table + 1] = Object
	for i,v in pairs(Table) do
		local Property = GetProperty(v)

		if Property then
			if v:FindFirstChild("DefaultTransparencyValue") then
				TweenService:Create(v, TI, {[Property] = 1}):Play()
			else
				local DefaultTransparencyValue = Instance.new("NumberValue")
				DefaultTransparencyValue.Name = "DefaultTransparencyValue"
				DefaultTransparencyValue.Value = v[Property]
				DefaultTransparencyValue.Parent = v
				TweenService:Create(v, TI, {[Property] = 1}):Play()
			end
		end
		Property = nil
	end
	TI = nil
	Table = nil
end

return module

^ the fade in / out module script

1 Like

Did the image load when you set the image property?

Hi, have you tried inserting the image into the image property of a decal first. To check that the image is loading as it should and also to check if the string changes?

did the decal get approved ? sounds basic but it could be it

I figured it out but thats essentially the solution. For some reason 1 of the assets were a “rbxassetid://” while the other 2 were “roblox.com/assets/. . .” I put it in the image label to get the right urls

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