My server supports 10 users.
All Ids of the users who belong to this server are saved in a DataStore, for future reference.
I can’t store users’ thumbnails in the DataStore, because they can change, so I only store the UserId.
I have a frame that shows the list of all users who belong to this server (even if they are not online). Players | Roblox Creator Documentation pauses the script until the thumbnail is recovered.
Even storing the thumbnail in a cache for later use, at least for the first time, it will yield.
So if it takes about 1 second to get each thumbnail, if I have 10 users, my script will pause for 10 seconds.
My question is if is there any way to get the thumbnails for the first time in a parallel process, without interrupting the script?
You actually need those. coroutine.wrap actually returns a function (just, not the typical ones), kinda like loadstring does. You need to add the () to actually run the code.