Hello guys, I have made a small module based on the Profiler service because I prefer function names like “get data”, here is a function I used to get the value of some key:
The best way to go about doing something like this is actually a for loop since :Wait() is available only using native methods of services. Since we’re waiting for an Instance modulary, a repeat loop would serve the best use. Good news is, it disconnects once the condition is met.
I’m almost certain this is a bad idea. calling the api that fast is just asking for errors.
@M78zhaoritian the best way to fix your issue is to modularize your code and initialize profile service before anything else. It will prevent race conditions.
Thank you, friend. However, I’m facing difficulties in initializing the profile service before anything else in my code. Even when I try to require it at the very beginning, there still seems to be some delay in handling players’ data. Could you provide a little details ?