Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Notification Script not sure wat to do for callback?

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",
}
)

1 answer

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

StarterGui:SetCore

This discussion is preserved as it was. New answers, comments, and votes are closed.