The player is not offline he is outside your culling radius.
Check with OneSync 'Infinity': how to use it for a deeper explanation.
tl;dr
You need to change the script. The client is not able to fetch the data directly, so you have to create a server component which collects the data and sends it to the client.