Ok so I will make a Tv in my game and images will change on it, but I noticed when the images change they take like 0.1 seconds to appear because the image isn't loaded.
wait(5) script.Parent.Decal.Texture = "rbxassetid://73737626"
Then I tried doing this, but still, the image took some time to appear.
local image = "rbxassetid://73737626" wait(5) script.Parent.Decal.Texture = image
And when the images constantly change I don't want 0.1 seconds of a blank white screen before another image appears.
You have to use the ContentProvider
service. The :PreloadAsync
function will preload the image. Note that the image has to be an instance which is inside a table in the script.
local ContentProvider = game:GetService("ContentProvider") local image = {script.Parent.Decal} ContentProvider:PreloadAsync(image) wait(5) script.Parent.Decal.Texture = image[1]
I think there is a property called Transparency. You could set multiple image and set it to 1
wait(5) script.Parent.Decal.Texture.Transparency = 0 -- The image will be visible but you will need to set other image transparency to 1
Way 2 if the first one isn't possible You could make a folder containing many decal then every 5 second you put it on tv
wait(5) local Pic = folder.Pic1 -- Change this Pic.Parent = script.Parent