I want to constantly change the background image

So im trying to constantly change the background image for an aesthetic for my Admin UI

But whenever it switches it’s just white instead of the image, any help please

FOR = script.Parent
wait(3)
FOR.Image = “rbxassetid://6485314800”
wait(0.9)
FOR.Image = “rbxassetid://6485315210”
wait(0.9)
FOR.Image = “rbxassetid://6485315511”
wait(0.9)
FOR.Image = “rbxassetid://6485316673”
wait(0.9)
FOR.Image = “rbxassetid://6485317344”

image

With Loop:

local FOR = script.Parent
local FORE = false

while wait() do
if FORE == false then
FORE = true
wait(3)
FOR.Image = "rbxassetid://6485314793"
wait(0.9)
FOR.Image = "rbxassetid://6485315203"
wait(0.9)
FOR.Image = "rbxassetid://6485315505"
wait(0.9)
FOR.Image = "rbxassetid://6485316669"
wait(0.9)
FOR.Image = "rbxassetid://6485317340"
wait(0.9)
FORE = false
	end
end	

Without Loop:

local FOR = script.Parent

wait(3)
FOR.Image = "rbxassetid://6485314793"
wait(0.9)
FOR.Image = "rbxassetid://6485315203"
wait(0.9)
FOR.Image = "rbxassetid://6485315505"
wait(0.9)
FOR.Image = "rbxassetid://6485316669"
wait(0.9)
FOR.Image = "rbxassetid://6485317340"
2 Likes

Thank you so much for this, who knew all I had to add was a local.

Sorry, you got confused. You didn’t need to add local. I just added it because it’s better to use. I converted the id’s (which were decal id’s) to image id’s.

why is it better practice tho?

Local variables are quicker to access, as a simple answer. If needed, more information about this can be found from the following posts:

1 Like