Server-script
CountryFunction.OnServerInvoke = function(plr)
local Country = require(ReplicatedStorage.CountryService):GetPlayerCountry(plr)
print("Country of"..tostring(plr).."is ")
print(Country.name)
return Country
end
Returns ireland, correct country
Localscript
local targetPlayer = Players:GetPlayerByUserId(player.UserId)
local CountryInfo = CountryFunction:InvokeServer(targetPlayer)
print("Country of the client is: ",CountryInfo)
frameClone:WaitForChild("CountryImage").Image = CountryInfo.decal
Returns the UK which isn’t the correct country and is the local players country instead of Ireland (correct country).
Can someone help me with this issue?