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)