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

SetCore: SendNotification has not been registered by the CoreScripts?

Asked by 7 years ago
local function callback(text)
    if text == "Yes" then
        print("They want extra points!")
    elseif text == "No" then
        print("They don't care...")
    end
end

local bindableFunction = Instance.new("BindableFunction")
bindableFunction.OnInvoke = callback

game.StarterGui:SetCore("SendNotification", {
    Title = "Welcome to my game!"; -- Required. Has to be a string!
    Text = "Do you want extra points?"; -- Required. Has to be a string!
    Icon = ""; -- Optional, defaults to "" (no icon)
    Duration = 5; -- Optional, defaults to 5 seconds
    Callback = bindableFunction; -- Optional, gets invoked with the text of the button the user pressed
    Button1 = "Yes"; -- Optional, makes a button appear with the given text that, when clicked, fires the Callback if it's given
    Button2 = "No"; -- Optional, makes another button appear with the given text that, when clicked, fires the Callback if it's given
})

Just trying it out, and this is code from their wiki. I'm just trying it out to see if it would be useful to implement in a game.

1 answer

Log in to vote
0
Answered by 6 years ago

It just means that all the core functions aren't loaded yet, stick a wait(4) (Maybe less) in there and you'll be good.

Ad

Answer this question