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

SetCore notification isn't working on join?

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

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;
})

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