What do you want to achieve? I want to make it so that when the owner or developer of my game joins a chat message will appear.
What is the issue? When I hit play, this happens.
Here’s my code.
textChatService:DisplaySystemMessage(`<b><stroke color=rgb(255,255,255) joins="miter" thickness="2" transparency="0"><font color=\"rgb(0, 157, 5)\">Lead Scripter </stroke>{player.Name} has joined the server.</b></font>`)
What solutions have you tried so far? I tried rearranging some elements but that didn’t work.
I think that you don’t need to escape the " strings since you’re using the ` symbol. So the string should be:
`<b><stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0"><font color="rgb(0, 157, 5)">Lead Scripter </stroke>{player.Name} has joined the server.</b></font>`
Or:
"<b><stroke color=\"rgb(255,255,255)\" joins=\"miter\" thickness=\"2\" transparency=\"0\"><font color=\"rgb(0, 157, 5)\">Lead Scripter </stroke>"..player.Name.." has joined the server.</b></font>"
Or:
'<b><stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0"><font color="rgb(0, 157, 5)">Lead Scripter </stroke>'..player.Name..' has joined the server.</b></font>'
Edit: @BadDad2004, I don’t believe you need to mention the message’s origin.
None of these worked, and I’m wondering if there’s a limit to how many modifiers you can have on text, because I also have this line of code for normal players:
textChatService:DisplaySystemMessage("<font color=\"rgb(50,255,0)\">"..player.Name.." has joined the server!</font>")
And this works just fine. Also, I have textChatService defined above, along with RBXGeneral and etc.
local textChatService = game:GetService("TextChatService").TextChannels.RBXGeneral
textChatService:DisplaySystemMessage(`<b><stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0"><font color="rgb(0, 157, 5)">Lead Scripter </stroke>{player.Name} has joined the server.</font></b>`)
textChatService:DisplaySystemMessage(`<b><stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0"><font color="rgb(0, 157, 5)">Lead Scripter </stroke>{player.Name} has joined the server.</font></stroke></b>`)
Hi, I think I found the solution as this worked for me. (edited from @Rescriptedd)
SystemChannel:DisplaySystemMessage(`<b><font color="rgb(0, 157, 5)">Lead Scripter <stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0">{player.Name}</stroke> has joined the server.</font></b>`)
textChatService:DisplaySystemMessage(`<b><stroke color="rgb(255,255,255)" joins="miter" thickness="2" transparency="0"><font color="rgb(0, 157, 5)">Lead Scripter</font></stroke> {player.Name} has joined the server.</b>`)