How do I get a server id?

Hello! (title)

  1. What do you want to achieve? I want to get the ID of the server the player is in. (My end goal is to have a certain VIP server have things that other servers don’t have.)

  2. What is the issue? I am not sure how to get the ID of the server that the player is currently inside. not the place, the entire server

  3. What solutions have you tried so far? I tried using Datamodel.JobID and Datamodel.PrivateServerID. Both either didint work or I didint use them right.
    (looking at This Post and the DevHub)

Sorry if the answer to this is really basic, I’m fairly new to lua.

1 Like

game.JobId or game.PrivateServerId is what you want. The former will not have any value while in an offline game (play solo) as it is only valid in a live server, and the latter will not have any value if the server is currently not a private or reserved server. This might be why you thought it was not working?

2 Likes

How did I not think of that-
Thank you lol