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

SetCore notification isn't working on join?

Asked by 6 years ago
local bindableFunction = Instance.new("BindableFunction")

game.Players.PlayerAdded:connect(function(player) -- Player Joined
    game.StarterGui:SetCore("SendNotification", { -- Start of SendNotification
    Title = "New Player!";
    Text = player.Name; -- "player.Name" is supposed to get the Name of the player
    Duration = 5;
    Callback = bindableFunction;
})
end)

What should be happening is when a player joins, a Notification for the whole server should appear with the text being the player's name.

1 answer

Log in to vote
0
Answered by
Nonaz_jr 439 Moderation Voter
6 years ago

Is this in a local script? Is the local script in a place that runs localscripts?

The script will not execute for the player himself joining, as his localscript is only loaded after that.

It should work when another second player joins though. Btw you don't need the bindable function like this.

Try this in a localscript in startergui to test:

player = game.Players.LocalPlayer
wait(5)
game.StarterGui:SetCore("SendNotification", { -- Start of SendNotification
    Title = "New Player!";
    Text = player.Name; -- "player.Name" is supposed to get the Name of the player
    Duration = 5;
    --Callback = bindableFunction;
})
Ad

Answer this question