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

System chat message on touch?

Asked by 2 years ago
Edited 2 years ago

This is really confusing me, how can I make a chat message when someone hits a certain part? For example, I need a message ("<username> has made it to the end!") to be sent in the chat once someone gets to the end and touches the finish line.

Help would be greatly appreciated, as I've looked on the dev forum and on youtube with no luck.

1 answer

Log in to vote
0
Answered by
SuperPuiu 497 Moderation Voter
2 years ago
Edited 2 years ago

Of course you have to use StarterGui:SetCore() to do that. That script should be put in a local script:

script.Parent.Touched:Connect(function(hit)
    game.StarterGui:SetCore("ChatMakeSystemMessage",{
        Text = hit.Name, -- Text to send
        Font = Enum.Font.SourceSansBold, -- Font
        Color = Color3.new(255, 255, 255) -- Color
        FontSize = Enum.FontSize.Size96 -- Font size
    })
end)
0
This would absolutely not work for other players. You need to use RemoteEvents and use a ServerScript to detected when the part is touched. Then, you have to use :FireAllClients() so that all players can get this event. Finally, use a LocalScript to recieve that event and use the :SetCore() function for the chat message. TLDR: use RemoteEvents PaleNoobs 37 — 2y
Ad

Answer this question