How to fix isfriendwith error

Hello Developers,

So I am making a custom leaderboard and I’ve made a textbutton for friending and unfriending so basically this is the script.

    if game.Players.LocalPlayer:IsFriendWith(game.Players:FindFirstChild(script.Parent.Parent.SelectedPlayer.Value).UserId) then
        script.Parent.Text = "-Unfriend"
        script.Parent.Text = "+Friend"

So if the text is +friend then player sends friend request if not sends unfriend request.Now the script don’t work it says there is no isfriendwith arguement.

Can anyone fix this? if yes reply below

You forgot an “s” after the “Friend”, the correct method is IsFriendsWith()

1 Like

Oh thanks alot! I thought it wont work