Basically, i’m trying to make a party system that peoples can join peoples in a private server so others peoples can’t join thems. Which could be usefull for player wanting 1V1 matches. However the script have an issue which doesnt fire the callback.
The test local script:
task.wait(20)
local bindableevent = Instance.new("BindableEvent")
bindableevent.Event:Connect(function(call)
if call then
print(call)
else
print("no call")
end
end)
game.StarterGui:SetCore("SendNotification",{
Title = "Party Invite",
Text = "Somewone invited you to join a party",
Icon = "http://www.roblox.com/asset/?id=16776729560",
Duration = 10,
Callback = bindableevent,
Button1 = "Join",
Button2 = "Decline",
})
there what i put, i also deleted the bindable function to prevent memory lost for players.
task.wait(20)
local bindablefunction = Instance.new("BindableFunction")
bindablefunction.OnInvoke = function(call)
if call then
print(call)
else
print("no call")
end
end
game.StarterGui:SetCore("SendNotification",{
Title = "Party Invite",
Text = "Somewone invited you to join a party",
Icon = "http://www.roblox.com/asset/?id=16776729560",
Duration = 10,
Callback = bindableevent,
Button1 = "Join",
Button2 = "Decline",
})
task.wait(11)
bindablefunction:Destroy()