How can i get the Country and Continent of a player

My Problem: I want to get the continent and country of the player like this:

America/Us

I found some solutions like use LocationService and Os.Date but that not give me the result that i want.

thanks for reading this, i hope you can help me.

3 Likes

Due to privacy reasons, this isn’t possible if you mean the country and continent that their IP is in.

:thinking: LocalizationService | Documentation - Roblox Creator Hub

2 Likes

Never knew that existed, so yeah this is possible with that function
Tested it on myself and it gave an accurate answer.

it give me the country but there is any way to get the continent???

There is a long way to this. Make an array list for each of the continents, consisting of all the letter codes for all the countries in that continent. Once that’s done, each time you get the country, you could run a for loop to figure out which continent that letter code is in. The link that @bura1414 sent will show you all the letter codes for the countries and might help you. I’m saying this again, this is a VERY long way, but if you have time, it should work. Hope this helps!

Why would you want to know the locations of your players-

But in all honesty, there is a relatively easy way. That lies in os.time

Since you can put that as local, you can check the time of the player’s time in their CURRENT location. That way, you can basically compare it with GMT time from server.

Then you can use the time zone map to have a rough sketch of where they are if you compare the difference in hours between GMT and their local time
image

I’m not sure why you would want to do this, but please don’t stalk player’s locations for anything malicious. XD

1 Like

No You can not. Period. This is violating privacy laws an you will get your account banned/deleted if you do this, Exploiters can use this feature and find out where other people in the game live and all heck breaks loose.

There are some games that do it

1 Like

Through roblox’s services using localization… thats allowed, but game devs using it in script’s is not.

then why is a function to do it?

1 Like

Its not… but devs try to “IP ban people” or “hard ware ban” witch would be cool if we could but can’t and devs trying to do this will get banned maybe even Ip banned because its an actual crime and you could get arrested by company laws, and parents would sue roblox and put them outta business.

i don’t think i can get arrested lol, and you don’t know how i will be using this

1 Like

Woah there… you’re just kinda assuming that the use case of this is malicous :sweat_smile:

What if a dev just wants to let you know what servers you are on or something? It’s a bit random but honestly a cool feature to have in your game.

Example of text in a gui or something:
Server: NA - US
Server: NA - Canada

1 Like

You might not get arrested if your a minor but you’ll get fined quit a bit.

It doesn’t matter if it’s malicious or not I’m just warning anyone who tries to do this. @emikael and exploiters will know because they can run dex and see ur scripts.

LOL it only works in local script not in server script

if i don’t use it in a local script any hacker can see it, and i am using this to make a shop

Go ahead if you want to do it do it, im not stopping you im just warning you of what will happen.

Why would you post this in dev forums… you realize that threes thousand of exploiters on here and other website…