local http = game:GetService('HttpService')
local whatever = workspace.ServerLocation -- change it to whatever here, so that it can replicate to client
-- this url has flags that only return information that's specifically needed.
local url = "http://ip-api.com/json/?fields=16394"
local region_format = "%s, %s"
local response = http:JSONDecode(http:GetAsync(url))
if response.status == "success" then
whatever.Value = string.format(
region_format,
response.countryCode,
response.regionName
)
end
Forked from: How to get a server Location on Roblox - #45 by Gojinhan