Notification once specified user joins

This is suppossed to work. I cannot see the notification because I don’t have anyone from my friends online who can join the game (at least the one I have good relations with), so I will test it before I mark it as solution. Thank you!

Go for it. I tested it myself. It should work like you asked.

It should look like this in explorer, am I right?
image

Oooh no no no. put the script inside of the StarterPlayerScripts or StarterCharacterScripts

Server-sided, right? not local

StarterGUI is ONLY callable by the client.

If you put a LocalScript in ServerScriptService it will not run, ServerScriptService only runs Server-Sided scripts.

okay i put it in startplayerscripts as server-sided script, is the player who joined suppossed to see it?

And if you want to utilize custom notifications you should either use remotes that fire to the script for the UI, or find a Player’s PlayerGui instance and edit it from there. Editing a gui in StarterGUI will not transfer to all clients using the GUI you modified in StarterGui.

What?? I don’t understand… (limit)

If I join, people see a notification that I joined, am I suppossed to see that notification too when I join?

image

Make it look like this. Otherwise I wont work

You can make an exception for your own Player Instance when joining.

Also, use a server sided script in ServerScriptService, this script will run every time a player is added, and then you can use an in pairs loop to search through every player with the exception of yourself, and then activate the notifications for every player found.

Example:

local event = event_path_here

game.Players.PlayerAdded:Connect(function(player)
	for i,v in pairs(game.Players:GetChildren()) do
		if v:IsA("Player") and v ~= player then
			event:FireClient(v,player)
		end
	end
end)

You can then have this so called RemoteEvent fire to a LocalScript in StarterGui, which will then give the notification. Utilize this with CoreGui.

You can use Hydrous’ method for the exact thing you wish for, and it must be parented to PlayerGui. (Script must be a LocalScript.)

Or, you use my method for the exception of the player who joined, who wont see it.

I will NOT be writing out an entire system for you as you cant ask for entire systems on DevForum. If you are looking for that, Scripting Support is not the category for that.


local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")

local playerToWatch = "ItzCrime_bruh" -- replace with the name of the player you want to watch

function onPlayerAdded(player)
	if player.Name == playerToWatch then
		local notificationText = player.Name .. " joined the game!"
		local thumbnailType = Enum.ThumbnailType.HeadShot
		local thumbnailSize = Enum.ThumbnailSize.Size420x420
		local thumbnailUrl = game:GetService("Players"):GetUserThumbnailAsync(player.UserId, thumbnailType, thumbnailSize)
		local notificationOptions = {
			Title = "Player Joined",
			Text = notificationText,
			Duration = 5,
			Icon = thumbnailUrl,
		}
		StarterGui:SetCore("SendNotification", notificationOptions)
	end
end

Players.PlayerAdded:Connect(onPlayerAdded)

Or you can continue with your other script and use an exception there.

I’m confused, I don’t know what type of script it should be and where it must be, maybe I don’t see notification because I’m loading so long but it takes around 2 second to load in, even if its a local script and located in starter player scripts.

I fixed it. (limit lolololololol)

bruh (thujek rtxqerjdkcrmffecd limit)

You should be able to find the exact answer you want in the post now.

So I guess I should make a server-sided script in ServerScriptService and it should look like this;

local event = event_path_here

game.Players.PlayerAdded:Connect(function(player)
	for i,v in pairs(game.Players:GetChildren()) do
		if v:IsA("Player") and v ~= player then
			event:FireClient(v,player)
		end
	end
end)

and I should make a event (PlayerAdded) somewhere (idk)?

Oh no no no, thats for if you want it to fire for ALL players. Use Hydrous’ method for only one player specifically.