______ Has joined the game!

I own a hotel, and I would like to have it so when an HR joins the game, a notification pops up with there profile picture, their name and their rank. I have seen other hotels doing this such as Echelon Hotels but I do not know-how. Any advice or help on how I could do this?

1 Like

I would use :GetRankInGroup and a PlayerAdded event to check when the certain player has joined.

game.Players.PlayerAdded:Connect(function(player)
     print(player.name)
end

maybe idk i just wrote it really quick

There are some tutorials on YouTube, have you tried there?
And have you started with some kind of code, that is unfinished or broken? Because this site is good for that stuff.

1 Like

If you want to send a notification like how roblox sends notifications when you’ve got a friend request in-game, you’d need to use SetCore and use the registered core name “SendNotification” when the PlayerAdded event is fired and their rank is checked using GetRankInGroup.

Resources:

  • PlayerAdded event
  • GetRankInGroup or GetRoleInGroup - The former returns the rank number of the role in the group that the user has (eg. 255 being the group’s owner, 0 for guest), while the latter returns the name of the role the user has
  • SetCore - scroll down to SendNotification
5 Likes

print(player.Name) is not really the way to show who joined as you will need to have access to the dev console and the output…

Like @beneathwintersky said, use the GetRankInGroup thing to check if there RANK-NUM in GROUP-NAME.

Don’t think it means by the rank number but this may help out:

And use PlayerAdded to then get the player

game.Players.PlayerAdded:Connect(function(player)
-- Check the players rank using GetRankInGroup
end

Ah, sent my answer a bit to late. Yes this is a better answer.

And here is a demo of the SendNotification

game.Players.StarterGui:SetCore("SendNotification", {
     Title = "Hello?",
     Text = "Is it me your looking for?"
     Button1 = "Ummm what?"
     Button2 = "Ok..."
     Icon = "LinkToUserImageOnRoblox"
})

I’m gonna try answering this question as soon as I get on my computer. It’s surprisingly easy, but we’ll wait until I’m on my PC.

1 Like

Right, try this: https://www.roblox.com/games/4984276546/Send-Notification-Roblox-DevForums-Game-1

You can copy the game by going to the page and pressing Hey u and then pressing Yes u

Also this sends notifications to all players.

In the Notification [Server] script, it goes by this: Title, Text, Button1Text, Button2Text, Icon, Duration

You can alter it to send that to all players when a certain player joins.

Yes, that is what I mean but how could I adapt it so it is like for a rank in a group so. Let’s say, all ranks above the rank ID 12 get it, how could I do that where it is like (NAME) (RANK) Has joined the game!

What do you mean by (RANK)? Rank ID or name? I don’t know how to convert RankId to RankName.

But for (NAME) it would be player.Name? I don’t know if that would make it say every player’s name.

I’ll start on it now. :slight_smile:

Do you want to have it in the chat?

Also, I have altered the game to say the owner has joined to all players when the owner joins. Using MultiRblx to test this though…

So like at my group we have ranks, lets say I wanted the rank Board Of Director to be notified upon joining.

WAIT, you mean… you don’t want all players to be notified? Just a certain rank?

No I want all the players to be notified when a certain rank joins the game.

Try this script:

game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(GroupId) == RankId then
        -- Use my notification thing to send a notification that a player in (RANK NAME) has joined the game
        -- I think you can also make it say that player's name without it saying all players name.
    else
        -- Nothing
    end
end)
1 Like

On the owner script thing where it says IconLink do I put my profile ID there?