How to make a script where when a player obtains a badge, it sends a system chat announcing that the player has obtained a badge?

u dont need clients to send a message

--server
game.StarterGui:SetCore("ChatMakeSystemMessage", data)

You forgot to add a " at the end

oof, I made a mistake in LocalScript.
Change Local Script to:

game.ReplicatedStorage.SendChatRemote.OnClientEvent:Connect(function(data)
		game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", data)
end)

You saw nothing

thanks for reminding me though

If you make chat in server we can’t send message to specified players.

Amazing timing I made a huge explanation on client, server and RemoteEvents yesterday. Here’s the post

Haha, commit you’re always funny. And, you’re welcome!

But we want it to send to all clients. So its not nessecary now.

Awesome! Thanks. Ill read it later.

1 Like

We can make server message toggle button if we make chat at client.

So, did you changed local script like this?

game.ReplicatedStorage.SendChatRemote.OnClientEvent:Connect(function(data)
		game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", data)
end)

He literally does not need that now either.

image
Thank you, it works now! Ill add the server script code to the rest of the badges.

Btw, you accidentally put the line twice lol

oofs, I have to edit lol thanks for telling me

I recommend adding @ to know it’s display name or username!

Alright, thank you! Depends if ill do it.

Hello! I know this is something old but I tried to do everything they said here but step 3 for some reason gives me an error most likely I’m doing something wrong but I don’t know much about scripting so… :confused:

If someone answers this I need help pls

my english is not very good but, you need to change PlayerNameHere to plr.Name

if you have any other problems, let me know, I’ll be happy to help you.

so i just have to change PlayerNameHere for what you said or do i have to add something else?

Well I tried to do it and it didn’t work it gives me this error I don’t know what it means :frowning:
image

sorry for not answering, could you give me the script to fix it?

1 Like