Detailed explanation here. I created a character customization menu and i stored the data on Server Storage. And then i created a function to load those each time the character respawns, which is player.Character.CharacterAdded. It works. The thing is, this script runs before the getAsync could get any data from the server so the first time a player joined. They will not load their customised character.
Now i temporarily fixed this by waiting around (5) to (10) after a character has been added, and then loading it. It works, but it isn't exactly giving my game a polished feel. Because it also affects the player respawn. Their custom char wont load until 5-10 sec.
Full script over here: https://pastebin.com/wKAkBTQn
(sorry if you cringe while reading the script. It's only been a few days since i started roblox studio with no experience in scripting at all so bear with me :> )
Alright. What should i do to make it run the load function after only after the data has been loaded from the server.
Any help would be greatly appreciated.

3 comments
Can you show the full script? The error is located at line 36 but you didn't provide any of lines 36. If you did send the script, please tell us what line its starting at
You may need to share the full script for different reasons - Single blocks of scripts have linear evaluation, and the CharacterAdded is only bound after the info is loaded. I fail to see how this could be resolved by a wait.
Line 36 is just the function to load the player's color selection, which on first time joining will results in nil becuase the function has been loaded before th server could fetch the player's customization save. But sure, let me share the whole script.