I’m planning on attempting to use an IP API to find the player’s home country.
Nobody else would see this information (Not even me!), so would it be allowed to do this?
I’m planning on attempting to use an IP API to find the player’s home country.
Nobody else would see this information (Not even me!), so would it be allowed to do this?
Cool, I actually didn’t know that existed!
I was going to use a third-party API to show more information but i’ll look into LocalizationService and see if it has what I need (Lots of geographical location from the IP)!
Alright, this only really helps with country codes, but I want more. Would all information given from an IP be allowed (country, state, public ip, etc)? All this information is already public. Plus, like I said, nobody else would see this.
If you could get their IP address at all, you should report it as a vulnerability. Roblox never intentionally allows developers access to IP addresses.
much easier to use LocalizationService:GetCountryRegionForPlayerAsync(LocalPlayer), i also made a module script to easily get the country’s name (in english) and also emoji, here’s the link: CountriesModule - Roblox
and here’s a small example script on how to use it (on a local script), this would be for someone in brazil:
local LocalPlayer = game.Players.LocalPlayer
local LocalizationService = game:GetService("LocalizationService")
local Countries = require(game.ReplicatedStorage.Countries)
local CountryCode = LocalizationService:GetCountryRegionForPlayerAsync(LocalPlayer)
print(CountryCode, Countries[CountryCode][1], Countries[CountryCode][2])
--Output should be: BR, Brazil, 🇧🇷
note that the function only returns “US” if you’re on studio, but works properly in-game
ip’s something personal (on roblox at least), so you shouldn’t do that, and you can only use HTTP requests on serverside, so it’d be… impossible to say the least
I made sure to check, its legal to have someone’s IP unless its not used for criminal things crime, so I wouldn’t recommend it for that purpose.
This is just a Long list of Countries, which I don’t see the exact purpose of using.
If anything, you should be using HttpService
for this to get a list of countries.
One link in particular is: http://country.io/names.json
How exactly do you plan on getting a player’s IP?
If you use HttpService, you will just get the server’s IP.
also works, but it works for me and some people i’ve given the module
May I get to mention if someone manages to get someone’s IP from a roblox game, it could be used for malicious intent, so Roblox has probably got systems in place to prevent you from getting it.
Yes, it is not possible to do it and to do so would likely be exploiting a vulnerability, which is banned.
Alright thanks.
I thought maybe if I used HttpService from the client I could get the IP and use it in a showcase “experience” (god i still hate that name change) and then report it as a vulnerability if it works.
I remember at one point there was a game that did that, and I didn’t know if Roblox patched it yet or not.
HTTPService only calls on server, so you’ll only be getting the server ip.
Okay, thanks
thirtycharacterssssss
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.