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

Im Trying to make a welcome message that appears To everyone, How do i do it?

Asked by
funzrey 58
10 years ago

I have this code right here:

function PlayerAdd() --Starts the Function PlayerAdd
    playerVar=game.Players.PlayerAdded
    print("A Player Has Been Added, Now Running Func PlayerAdd") --Prints That a Player has been added
    msg=Instance.new("Message", game.Workspace) --Creates DAT Annoying Message :D
    msg.Text="Welcome ", playerVar, " To The Server!" --Changes The Text of the message to Welcome!
    msg.Parent = game.Workspace --Changes Where the Message is
    wait(5) --waits 5
    msg:remove() --Removes dat annoying message

end --Ends The Function PlayerAdd
game.Players.PlayerAdded:connect(PlayerAdd) --When a player is added, Runs the Function PlayerAdd

Commented Well, i know Im trying to get playerVar To be the name of the player that just joined, so the message will not get annoying with just Welcome!, Please Help me!

1 answer

Log in to vote
0
Answered by
JuHDude 25
10 years ago
game.Players.PlayerAdded:connect(function(playerAdd)
    print("A Player Has Been Added, Now Running Func PlayerAdd")
    msg=Instance.new("Message", game.Workspace)
    msg.Text="Welcome " ..playerAdd.Name.. " To The Server!"
    msg.Parent = game.Workspace
    wait(5)
    msg:remove()
end)
0
thanks :) i understand it funzrey 58 — 10y
0
No problem :) JuHDude 25 — 10y
0
Can you one up my post, i really need 1 rep, i got -2, cause of some noobs going -1 on me funzrey 58 — 10y
Ad

Answer this question