Player:GetFriendsOnline() not acting as stated on wiki

Hey guys,
I didn’t used to have this problem but recently I’ve been getting an error code when trying to join friends on my game consistently. The game is teleporting from its own lobby to a place that is within the game, but not the start place. I did some digging around and here’s what I found:

Here’s the wiki page for the GetFriendsOnline function:

Here’s the value that’s being returned to my script:

When I go to configure my game, here’s the ID in the URL:

So, somewhere along the way, a miscommunicated variable name probably caused a roblox engineer to accidentally update this API to return the wrong value.

It would be nice if the GameId actually stayed how it was and a new JobId table entry was added, but this is currently breaking my friend-joining functionality across different servers and I’m not sure what to do about it. Thanks.

Game Link: [Subaru Kits!]Midnight Racing: Tokyo DEMO - Roblox

5 Likes

Thanks for the detailed report. We will fix this bug.

5 Likes

I also think it would be good if the GameId actually stayed how it is and a new JobId table entry was added.

As a workaround in the meantime you can use:

game:GetService("TeleportService"):GetPlayerPlaceInstanceAsync(uID)

GetPlayerPlaceInstanceAsync

This gets the player’s JobId from their UserId

4 Likes

That is what I ended up doing, but that was only available on the server so I had to create a new remote and ask the server for that information, as opposed to keeping it all client sided.

In my opinion, to keep old games from breaking, it would be best to deprecate this but keep it functional and create a new service that overlays this but includes GameId and JobId with proper naming conventions for newer roblox.

2 Likes

Just wanted to check on the progress of this fix. Was also intending to use this API but found out that this issue still occurs. Is there possibly an ETA for a fix?

3 Likes

Hey! Seems like this is still an issue. Caused me a good bit of confusion before I could figure out I was getting data different from what the docs were telling me.

4 Likes

This is still an issue yeah , I hate it. The worst thing out of all is that for some reason I get Forbidden error when using the GetPlayerPlaceInstanceAsync. So there is basically no way for me to get the JobId :slight_smile:

Yep, this is still unfortunately an issue for me too. GameId used to contain the JobId, so I’m guessing there was some mistake(?) on Roblox’s part. It’s been over a year, and this issue has not been solved.

2 Likes

Is there any update on this? Some people are saying it is still happening.

1 Like

Sorry for dredging up an old thread. It seems that GameId is now returning the JobId again instead of the universe id?

Can anyone confirm if this is correct?

It’s seems strange to me that a field called GameId is not the same as game.GameId. Why not just add a new field called JobId?

2 Likes

I have the same issue - it’s returning JobId instead of the game Id. Completely broke my ‘join friend’ system.

The GetFriendsOnline GameId field should return JobId, and indeed does so now. This is intended.

3 Likes

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