Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't the Notification Alert appearing?

Asked by
Despayr 505 Moderation Voter
4 years ago

I have a script in serverscript service where when something spawns, this script fires. It says that the pcall success message is true, but the notification refuses to appear.

--[[-Variables-]]--
repeat wait() until game:IsLoaded() == true
local Remote_Events = game:GetService("ReplicatedStorage"):WaitForChild("#$Remote_Events")
local NotificationAlert = Remote_Events:WaitForChild("NotificationAlert")

--[[Notifications-]]--

NotificationAlert.OnClientEvent:Connect(function(Header, Desc)
    if Header and Desc then

        local Callback = function()

            print("hello")
        end

        local Details = {
            Title = ""..Header;
            Description = ""..Desc;
            Icon = "";
            Duration = 5,
            Callback(),

        }

        local success, errormessage = pcall(function()
            game:GetService("StarterGui"):SetCore("SendNotification", Details)
        end)
        if success then
            print(success)
        else
            print(errormessage)
        end

    end
end)
0
My only guess is you're using 'Description' in your Details library instead of 'Text' like it says on the DevHub climethestair 1663 — 4y

Answer this question