As a Roblox developer, it is currently too hard to accurately get the hosting location of a Roblox server that is being played on.
If such a feature existed, it’d allow developers to do various things, such as improve matchmaking through use of prioritizing servers closer to the user, or even having certain builds/GUIs cater to the user in single-player games. More information/a proposed implementation can be found below.
Proposed Implementation
When the forum about the Server List Update was released, one of the answers to the FAQs was:
It would be useful if one of these tools allowed us to get the region in which the server is hosted. This can be used to allow players to join games in regions that are closest to them for optimal gameplay. Not only that, but it’d also allow developers to use this to customize certain aspects of their game.
Example: A single-player city game wants to customize the city based on where the server is located(Using “Nandos” as a fast-food resturant for a UK-based server versus using "Chick-Fil-a [] for US-based servers).
Here’s an example on how I was thinking it could be used/implemented:
local Region = game:GetHostLocation()
if Region == Enum.ServerHostRegion.USEast then
print("Timezone: EST")
elseif Region == Enum.ServerHostRegion.USCentral then
print("Timezone: CST")
end
And if desired, you could even take it a step further and have it return a special array with these values:
local HostData = game:GetHostLocation()
print(HostData.Country) --Prints "US"
print(HostData.Region) --Prints "East"
Of course all this can be subject to change, but overall I think it’d be a useful feature.