CoreGui notification not working

Hello everyone, Im trying to make a notification with the roblox core gui but it doesnt work.
Here’s how im doing it:

			startergui:SetCore("SendNotification",{
				Title = "Not enough money";
				Text = "You don't have enough money to buy this";
				2
			})

And this is the whole script:

local plr = game.Players.LocalPlayer
local model = script.Parent.Parent.Boat.Value
local event = script.Parent.Event.Value
local errorlabel = script.Parent.Parent.Parent.Parent.Error
local label = script.Parent.TextLabel.Value
local startergui = game:GetService("StarterGui")

script.Parent.MouseButton1Click:Connect(function()
	if label.Text == "AVAILABLE" then
		if plr.leaderstats.Coins.Value > 149 then
			event:FireServer(model)
			plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value - 150
			print("Player has enough coins")
		else 
			print("Player doesn't have enough money")
			startergui:SetCore("SendNotification",{
				Title = "Not enough money";
				Text = "You don't have enough money to buy this";
				2
			})
		end
	else
		print("Spawn is occupied")
		startergui:SetCore("SendNotification",{
			Title = "Spawn Occupied";
			Text = "Spawn is occupied";
			2
		})
	end
end)

What is the error?

There is no error.

30characters

		startergui:SetCore("SendNotification",{
			Title = "Not enough money";
			Text = "You don't have enough money to buy this";
			2
		})

What is the 2 for? the notifications won’t work because of that

1 Like

Oh, its the duration, but if I dont put it there where do I put the duration?

	startergui:SetCore("SendNotification",{
		Title = "Not enough money";
		Text = "You don't have enough money to buy this";
		Duration = 2;
	})

You would have to put Duration = 2 just like Text = “You don’t have enough money to buy this” because it’s a dictionary

3 Likes