Is there way to fire function when player get a friend request?

Hello.
I’m currently have idea of making new friend system for my game, But I don’t know way or event to fire function when player get friend request and get information from who get request, I looked at Friends API
but nothing shows, Friend Service nothing too so I decided to ask you guys.
Thank for responding.

Looking at the API, it looks like this can only be used by core scripts…

The following script produced the error The current identity (2) cannot Class security check (lacking permission 1), which means that the FriendRequest service is only accessible by scripts made by Roblox.

game.Players.FriendRequestEvent:Connect(function(arg)
	if arg == Enum.FriendRequestEvent.Issue then
		print("Sent a friend request.")
	end
end)

I hope that this was helpful.

1 Like

But uhmmm, I do not know from who send it and who get it

Really sorry, but it is hard to understand what you are asking.

If you are wondering how you can find out who sent a friend request to who, the short answer is that you can’t. I went into that in my previous post.

1 Like