Notification On Player Joined

So, I’m trying to make it when people join a game it sends a notification to everyone. I have a server script firing the event, that has no errors. But when the script:

game.ReplicatedStorage.Notify.OnClientEvent:Connect(function(player)
game.StarterGui:SetCore("SendNotification", {
	Title = player.." joined!";
	Text = "Welcome "..player.." to the game!";
	Duration = 5;
	Button1 = "Ok!";
})

end)

is ran it always errors. Any help? The error is 14:49:48.545 - SetCore: SendNotification has not been registered by the CoreScripts

1 Like

Could be that the core scripts havent loaded in yet. It takes a while for everything to get registered. Maybe a very naive wait would fix this?

3 Likes

This means the core scripts haven’t finished loading yet. You will have to wrap setcore in a pcall and keep trying until it doesn’t error and goes through.

You could try this solution:

or

2 Likes