PreloadAsync on font asset id yields AssetFetchFailure

For my loading screen I want and need to preload the font I’m using (Silkscreen) because it doesn’t load in before it becomes visible.

My issue is that PreloadAsync gives me an asset fetch failure for its asset id, I’ve tried the rbxassetid content format and http based one with no luck, the asset id is correct and I can’t figure this out.

ContentProvider:PreloadAsync(
	{
		"rbxassetid://12187371840" -- Silkscreen font asset id
	},
	function(content: string, fetchStatus: Enum.AssetFetchStatus)
		print(content, fetchStatus)
	end
)
-- output:
-- 01:51:29.086  rbxassetid://12187371840 Enum.AssetFetchStatus.Failure

I have noticed a really slight slowdown in assets loading in general, but they do load.

I’m really confused here so if anyone’s had this issue or see/know something I don’t please do tell, any help is appreciated!

Hey Shirovian!

Encountered the same issue, and here is my solution: instead of passing the font ID to the preload function, pass the whole TextLabel (or whatever Text object you use).

local callback = function(assetId, assetFetchStatus)
	print("PreloadAsync() resolved asset ID:", assetId)
	print("PreloadAsync() final AssetFetchStatus:", assetFetchStatus)
end

ContentProvider:PreloadAsync({ script:WaitForChild("LogoNameLabel") }, callback)

-- Output:
-- PreloadAsync() resolved asset ID: rbxassetid://12187360881
-- 14:03:04.225  PreloadAsync() final AssetFetchStatus: Enum.AssetFetchStatus.Success

Hope it helps!

2 Likes

Thank you, that solves my problem! :slightly_smiling_face:
This was really confusing as the documentation says content ids should work too, an oversight maybe?

1 Like

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