i want to use sendnotification and it to say like someone won the tournament, but idk how to use it and if i should use client or server
as in starterGui:SetCore("SendNotification")
?
i think its that, idk but ye probably
1 Like
StarterGui:SetCore("SendNotification", {
Title = "title here", -- Notification title
Text = "text here", -- Notification text
Icon = "rbxassetid://0", -- Notification icon (optional)
Duration = 5, -- Duration of the notification (optional, may be overridden if more than 3 notifs appear)
Callback = nil, -- Bindable Event (will provide docs if wanted)
Button1 = "OK", -- button 1 text (optional)
Button2 = "Cancel" -- button 2 text (optional)
})
Button clicks can be passed to a bindable passed to Callback:
local clickBindable = Instance.new("BindableEvent")
clickBindable.Event:Connect(function(clickedButtonText)
print(`user clicked {clickedButtonText}`)
end)
StarterGui:SetCore("SendNotification", {
Title = "click a button!",
Text = "Click one of the buttons!"
Callback = clickBindable,
Button1 = "OK",
Button2 = "Cancel"
})
2 Likes
local or server script??
char limit
SetCore is a client-side method, so if you want to use it from a server, you’ll probably have to use a remote or something, afaik all types in the SendNotification table can be sent through a remote except the bindable, you can attach the bindable as the client receives the table from the server I guess?
ok i will try it rn
char limit
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.