Is there a way to see if a friend request was accepted or denied?

So this exists:

game.StarterGui:SetCore("PromptSendFriendRequest", Player)

How do I check if the other person accepted or denied it?

As far as I know there isn’t a way to get if the player has accepted or not.

1 Like

I’ve not experimented with SetCore() or GetCore() functions and parameters much, but you might have some luck with PlayerFriendedEvent.

According to the Creator Docs, calling StarterGui:GetCore("PlayerFriendedEvent") should return a BindableEvent, in which you can use to detect if the request was accepted. I’m unsure if this is not actually accessible, however. The docs didn’t mention anything about it.

I don’t believe you can detect a player denying an FR though.

1 Like

Thank you for mentioning this, as I had no idea this existed before. I never took the time to go through the GetCore strings. However, instead of using StarterGui:SetCore, it’s actually StarterGui:GetCore.

Example:

local StarterGui = game:GetService("StarterGui")
local friendedEvent = StarterGui:GetCore("PlayerFriendedEvent")
friendedEvent.Event:Connect(function(player)
	print(player.Name .. " has friended the local player!")
end)

or, you can try the minified version.

game:GetService("StarterGui"):GetCore("PlayerFriendedEvent").Event:Connect(function(player)
	print(player.Name .. " has friended the local player!")
end)
3 Likes

Ah whoops, my bad. I thought I wrote the right function. I’ll fix my post.

1 Like