I'm nor sure what i do for callback, my plan is to if the player picks accept then it will prompt another notification, how would i do this?
sgui:SetCore("SendNotification", { Title = plrname, Text = "Sent you a friend request!", Icon = icon, Duration = 5, Callback = WATDOIDO, Button1 = "Accept", Button2 = "Decline", } )
This is one way you can use Callback i have shown you below.
local function CallBack(Value) if Value == "Accept" then print('Accepted') elseif Value == "Decline" then print('Declined') end end local Function = Instance.new("BindableFunction") Function.OnInvoke = CallBack sgui:SetCore("SendNotification", { Title = plrname, Text = "Sent you a friend request!", Icon = icon, Duration = 5, Callback = BindableFunction; Button1 = "Accept", Button2 = "Decline", } )
You can find out more information about this by clicking the link below