Hello, I wonder how to “prepare” guis? Like, whenever players open my gui it needs a second to load in.
But in most games this isn’t the case.
The gui is always visible and tweens in. But also before i used a tween and it was invisible until it was clicked, i had the same issue. How can I solve this?
1 Like
You can use
game:GetService("ContentProvider"):PreloadAsync()
to preload assets.
How would I implement that into a GUI?
game:GetService("ContentProvider"):PreloadAsync({all of your image frames and sounds etc})
PreleoadAsync is recursive so it’ll preload all of an instance’s descendants as well.
When the function is called, the engine will go through the array of instances (and all of the descendants of the passed-in instances).
ContentProvider:PreloadAsync({ScreenGui}) --preloads screengui's descendants
1 Like