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

How do you make Server chat messages?

Asked by 6 years ago

how do you make a server be able to create messages in chat? can you change the color? can this be done locally? can it be deleted after like 5 seconds?

1 answer

Log in to vote
1
Answered by
Optikk 499 Donator Moderation Voter
6 years ago

AFAIK, there are two ways to do this. One way is to create a chat bot with chat modules but I never successfully did that.

There is also

StarterGui:SetCore("ChatMakeSystemMessage", dictionary<Variant> configTable)

But this function is intended for local scripts. You would have to use remote events to let the server message all players.

An example:

Server Script

local remote = Instance.new('RemoteEvent')
remote.Name = 'ServerMessageRemote'
remote.Parent = game.ReplicatedStorage

function SendMessage(text)
    remote:FireAllClients(text)
end

game.Players.PlayerAdded:Connect(function(player)
    SendMessage(player.Name .. ' has joined the server')
end)

Local Script (in starter player scripts)

local remote = game.ReplicatedStorage:WaitForChild('ServerMessageRemote')

remote.OnClientEvent:Connect(function(message)
    game.StarterGui:SetCore('ChatMakeSystemMessage', {Text = message})
end)
0
so can you do this for one player mattchew1010 396 — 6y
Ad

Answer this question