No. Your logic for handling an empty queue is fine, but you’re not taking into account what happens if queue is greater than zero before entering the loop. What happens if game.ContentProvider.RequestQueueSize=5? Your loop will keep waiting, waiting, waiting, but queue is never updated, so print ("queue is 0, loaded") will never be reached.
You’re only getting queue once, outside the loop. queue will only store whatever the queue size is at that moment; even if game.ContentProvider.RequestQueueSize changes later, unless you explicitly update queue again inside of your loop with queue = game.ContentProvider.RequestQueueSize then queue will never change.
Everything about that snippet is less than satisfactory: while true loop, wait(), and in the context of your problem, infinitely blocking. But I digress.
If you really want me to spoonfeed you the solution, place this line of code:
queue = game.ContentProvider.RequestQueueSize
in here:
while wait() do
--RIGHT HERE PLACE IT RIGHT HERE YES? OK? REPLACE THIS COMMENT WITH THAT LINE OF CODE
indicator.Text = "Loading... (" .. queue .. ")"
Even then your loop is never broken out of. You should avoid while true/wait() in your code; even when the loading screen is hidden, the loop that controls it is still running in the background, wasting precious CPU time. Maybe something you could look into later.