Can I track a players location?

Can I track a players location? Like this script works:

local LocalizationService = game:GetService("LocalizationService")
local player = game.Players.LocalPlayer

local result, code = pcall(function()
	return LocalizationService:GetCountryRegionForPlayerAsync(player)
end)

if result and code == "US" then
	print("Hello, friend from the United States Of America!")
else
	print(code)
end
1 Like

What do you mean by tracking a player’s location?

I dont think you are able to track their real location.

The code you put in your post is good enough.

Tracking player location goes against TOS. The most you can get is the server location.

Try the script yourself in a localscript, it will say for example usa US or whatever their country is

Thank you so much, this explains alot!