Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
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)

3 comments

0

thanks :) i understand it

0

No problem :)

0

Can you one up my post, i really need 1 rep, i got -2, cause of some noobs going -1 on me

This discussion is preserved as it was. New answers, comments, and votes are closed.