Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

SendNotification not working, 2nd argument missing or nil?

I think it's enabled now, because earlier times I tried to use it it didn't throw any error messages when I was using the wiki code (which never works), and now it has error messages. So this is the code I tried at first:

local notify = {
		Title = "Notification Title";
		Text = "This is a test notification";
		Icon = ""; 
		Duration = 5;
	}
	
	game:GetService("StarterGui"):SetCore("SendNotification", notify)

By doing this it says that SendNotification has not been registered by the CoreScripts. So I did this:

game:GetService("StarterGui"):SetCore("SendNotification", notify)

notify = {
		Title = "Notification Title";
		Text = "This is a test notification";
		Icon = "";
		Duration = 5; 
	}
	

Then when I do this, it says something about the second argument being missing or nil. Now this should be easy to fix, but there is absolutely NO information about it on the whole internet so I have no idea what the second argument is for, and what I need to put in there.

1 comment

0

The first one was correct in defining notify before you do the SetCore, but I have know clue how to fix that error.

1 answer

✓ Accepted answer

Some SetCore features require some time before they can be used. This is what Roblox meant by "SendNotification has not been registered by the CoreScripts".

wait()ing before calling SetCore should do the trick.

Another example of SetCore feature that requires some time is "TopbarEnabled".

This discussion is preserved as it was. New answers, comments, and votes are closed.