Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I tell if a player isn't friends with another player?

Asked by 3 years ago

So I'm trying to check if the player is friends with the Owner. I am getting the error: Unable to cast string to int64. I have this code as my if statement and I don't know what I should do to fix it.

if Player:IsFriendsWith(Owner) == false then
    --DoWhatever
end

1 answer

Log in to vote
0
Answered by 3 years ago

The parameter for the IsFriendsWith function has to be an int64, aka the owner's UserId. Simply go to the owner's profile page and copy and paste their Id into the parentheses or the value for local variable.

Ad

Answer this question