Indexing game.PrivateServerId warns on client

If there is a localscript with

local x=game.PrivateServerId

then Roblox always warns ‘VIPServerID checked on client, but only set on server.’ (studio and game)

This is a little annoying because I want to keep the console clean, but the warning is outputted for each time you index.

2 Likes

Why not just avoid indexing it on the client? It’ll return an empty string if indexed on the client anyway - it’s better that developers are warned that the PrivateServerId isn’t actually visible to the client than them expecting it to be, and end up being confused why their code doesn’t function as intended.

I wouldn’t say this is a bug, more of a feature request. If you want it visible to the client, make thread in #platform-feedback:engine-features, though you could easily send it to the client via a remote event or function. This warning is definitely intended behaviour, though it should probably be mentioned on the developer hub page, so you could make a thread reporting this in #platform-feedback:developer-hub.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.