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

Notification help, can anybody help me with my notification script please?

Asked by 5 years ago

So I'm too make a Notification script where you can get a notification when a player joins the game. like Player.name joined the game :3 (Please be aware I'm just started scripting so I'm not that great at it)

game.Players.PlayerAdded:Connect(function(player)
    Instance.new("Message",game player.name,ImageId ("has joined the game")


wait(2)
game.Workspace.Message:Remove()
end)
0
what EmbeddedHorror 299 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

messages are deprecated. use a gui now.

first off design a server message gui and once done designing it put it in replicatedstorage. and make sure your gui has a textlabel called Message (with caps because scripting is capital sensitive) because that's gonna be the join message. now insert a script in serverscriptservice. after, make a playeradded event so your code will be something like this:

game.Players.PlayerAdded:Connect(function()

end)

now, you need to copy the gui then put it in playergui inside of all of the players and change the message. you will need to concat in order to have the player's user in the message. your code should be something like this now:

game.Players.PlayerAdded:Connect(function(plr)
    local PlayerMessage = game:GetService("ReplicatedStorage"):FindFirstChild("put the      name of the gui here")
    PlayerMessage.Parent = im sure your smart enough to figure this part out
    PlayerMessage.Message.Text = plr.Name.." has joined!"
end)

there!

Ad

Answer this question