How to get a Server Location/Region on Roblox

either you’re using the endpoint wrong or ask the guy who made the API

2 Likes

Wdym?

You’d just make a UI yourself. In this tutorial Deadwoodx used a string value object under workspace, so you could just make a TextLabel, give it a local script, and set the text to the value of that object.

1 Like

For those who want to find more APIs on the internet
Check this out:

Its safe not a scam link, don’t worry

I’ve really been interested in this post, so I decided to make my own resource for all of you to enjoy, its called LocationService.

Heres the module:

Lets talk about the parameters: returnedData and allowUseInStudio

returnedData -- string: put in one of the strings listed in the decoded table above

allowUseInStudio -- boolean: if false, the module will error and prevent it from running in studio.

Huh, I just tried my best, to tell something, it would be nice if you have DM me the errors, so I can learn from it maybe, and fix the errors

i literally explained before that you cannot get the IP of any player, only the server lmfao

1 Like

Hello, where did you find that the first player to join a server determines its location? Do you have any more information on how roblox server location works?

Yes, I have recently explained how the server location system works in this post

Where did you find that information

Google, Youtube, Twitter and Documentation

Can you link me to the documentation

Sure



Hi there again,

I have recently remade my LocationService module. The link is still the same, although the API is now different.

Here is an example script:

local LocationService = require(game:GetService("ServerStorage").LocationService)
local LocationInfo = LocationService.GetServerLocation({"regionName", "countryCode"})

print(string.format("Server Location: %s, %s", LocationInfo[1], LocationInfo[2]))

In my case, this should print Server Location: Illinois, US

GetServerLocation(parameters: {string}): {[number]: string}

Parameters: A table of strings of what data you want returned.
Returns: Array

5 Likes

Am I misunderstanding this post? Because from what I can tell this code is only getting the players information, not the servers information. Just because a New York player is the first person in a server, that doesn’t mean the server is located in New York, and I don’t think Roblox has servers in every city and every state lol.

2 Likes

Sorry but, there is no way on Roblox to get a User’s Location and IP Address.

What your doing here is, when a player joins, the server sends a request to IP API, its an API, it gives you the information as follows about the person/bot who clicked it.

And now as you click the link, you get your IP address and geolocation, because you are the person who clicked the link.

Similarly, thing Roblox servers are people, you make them click the link, and they get the data of their location, so if they are located in the USA, you get server location = USA.

1 Like

Actually no, the server location is determined by the server and physical factors, such as server availability.

I meant by, in most cases, the server location is a nation near the player.

1 Like

You can’t get a player’s IP. It gets the server’s IP.

2 Likes

How are you able to confirm it’s the actual servers information? rather than some data transfer station or a player?

2 Likes

I don’t know if my response is related to your problem, but:

When you are running that in Studio, yes, it actually gets your information since for Roblox Studio, your Computer is the Server. That should not be a problem if you run it in an actual Game Session using the Roblox Client.

2 Likes