PreloadAsync() doesnt fix the issue of decals/imagelabels flickering

i tryied to preload the images after the decals started to flicker ingame but not on studio i tried using PreloadAsync and stuff but even if the script says all loaded the flickering still happens here is part of the code lets say i had Ids there :

local IDS = {}
local Actions = {
	default = {B1 = "", B2 = ""}
}

-- This will be hit as each asset resolves
local callback = function(assetId, assetFetchStatus)
	print("PreloadAsync() resolved asset ID:", assetId)
	print("PreloadAsync() final AssetFetchStatus:", assetFetchStatus)
end

for i, OBJ in Actions do
    for _, Child in OBJ do
		if Child then
			table.insert(IDS, Child)
        end
    end
end

-- Preload the content and time it
local startTime = os.clock()
ContentProvider:PreloadAsync(IDS,callback)
local deltaTime = os.clock() - startTime
print(("Preloading complete, took %.2f seconds"):format(deltaTime)
2 Likes

here is a little trick, but its kinda resource heavy I would say.

instead of preloading the IDs itself, create decals and parent them somewhere where it still can be rendered (set the transparency to .99 so it wont distract), and preload them all. dont delete them though, or they will be garbage cleaned and uncached, and the flickering will be back again

hope this helps!

i made the decals and made then far from the screen and size to 1 pixel it worked

1 Like

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