Hi, I made a notification that when a player joins, a warning will pop up. If the user clicks the Agree button, the notification would dismiss. But what I need help with, how do I kick the player with a message if they click the Decline button?
This is what the notification looks like:
The script:
local function callback(Text)
if Text == “Agree” then
print (“Answer”)
elseif Text == (“Decline”) then
–action to kick should be here
end
end
local NotificationBindable = Instance.new("BindableFunction")
NotificationBindable.OnInvoke = callback
--
game.StarterGui:SetCore("SendNotification", {
Title = "WARNING";
Text = "This game contains flashing lights and loud audios. Not suitable for anyone with photosensitive epilepsy.";
Icon = "rbxassetid://240664703";
Duration = 100;
Button1 = "Agree";
Button2 = "Decline";
Callback = NotificationBindable;
})