RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create a script that welcomes a new player in the game using chat"
-- server script local Players = game:GetService("Players") local function welcomeNewPlayer(player) local playerName = player.Name local message = "Welcome " .. playerName .. " to the game!" game.Workspace.Events.Chat:FireAllClients(message) end Players.PlayerAdded:Connect(welcomeNewPlayer) -- local script inside Chat event local event = script.Parent local chat = game:GetService("Chat") event.OnServerEvent:Connect(function(message) chat:Chat(game.Players.LocalPlayer.Character.Head, message, "White") end)