Here is what I have:
script.Parent.MouseButton1Click:Connect(function()
if game.Players.LocalPlayer.Name ~= script.Parent.Parent.TextBox.Text then
game.StarterGui:SetCore("PromptSendFriendRequest", script.Parent.Parent.TextBox.Text)
end
end)
But it only lets me send if the player is in the server. I want it so it sends to their friend request inbox thing on the website.
EDIT: I found this website thing with the Roblox Web APIs. I found one for making a user send a friend request but have no idea how to use it. It can be found under Domains > Friends API > /v1/users/{targetUserId}/request-friendship. How on earth would I use it???

7 comments
You are not able to do that, as far as I know
I dont think that is possible for spam reasons.
Checked and yes it is impossible to do. https://developer.roblox.com/en-us/api-reference/function/StarterGui/SetCore
you can probably use/make a plugin
also why do you need to send a friend request via game?
I'm confused. Why would you want to send a friend request with a script. When you can just do it the normal way??
lmao you cant friend yourself