A few days ago my game has started having problems identifying who’s your friend in-game.
I periodically call Player:IsFriendsWith()
on all players client-side to check the current friend status, and it seems like Player:IsFriendsWith()
somehow returned false
for a player who was my friend for the whole period:
This code snippet might roughly show what I’m doing:
local is_friends = nil
local success, result = pcall(function()
is_friends = LocalPlayer:IsFriendsWith(tonumber(user_id_string))
end)
if success ~= true then
warn("[FriendClient]: :IsFriendsWith() error:", result)
end
if success == true and type(is_friends) == "boolean" then
if is_friends_server ~= is_friends then
print(`[FriendClient]: Requesting server to switch friend state for {user_id_string} from "{is_friends_server}" to "{is_friends}"`)
update_list[user_id_string] = is_friends
end
end
The game this was captured in: