Hi, I made a button that prompts the invite friends GUI, although I would like to make it so that, once a player has invited one of their friends, they earn 5 Points. This is the code I have right now. How should I modify it so it adds 5 Points?
local button = script.Parent
local SocialService = game:GetService("SocialService")
local player = game.Players.LocalPlayer
button.MouseButton1Click:Connect(function()
SocialService:PromptGameInvite(player)
end)
Hold on, doe sthis add points when they invite a player or only when that player joins? I don’t really understand this part: game.ReplicatedStorage.ShowMessage:FireClient(player, #ids, XPMade)