#How do i make a script where it puts messages in chat with custom colors?
1 messages · Page 1 of 1 (latest)
bro
before asking on here search on google
StarterGui:SetCore()
Then why isn't that message in Guideline Rules?
it dosent need to be
it wastes time of other people if there is an easy answer on google
i have some trouble with using this service, when it tried to send message. it just says that its not member of something
local WarnChat = {}
function WarnChat.Trigger()
game.TextChatService.TextChannels.RBXGeneral:DisplayServerMessage("Hide..")
end
return WarnChat
i put code from youtube tutorial but doesnt work
bruh i even changed DisplaySeverMessage to DisplaySystemMessage and the output shows this:
you have to do it on a local script
oh wait i can code module script to enable the local one
but i have a problem, when the local script got activated
clone the local script into every player
Adinos admin gave me urgent message
so it shows for all players
and "Hide.." in chat didnt pop up
lemme do some research
as soon as the local script got acivated
what if i try to do the player gui instead of screengui
what does it say
just some announcement that i dont even know what it even says
my studio just crashed
click it
its probably some message or issue with it
dw abt it
oh
so there is a vulnerability
i wouldnt worry unless you have a playerbase over 10
just make a custom message
with gui
u can also use remote events like this guy
local WarnChat = {}
local Players = game:GetService("Players")
local PlayerGui = game:GetService("PlayerGui")
function WarnChat.Trigger()
for _, player in Players:GetPlayers() do
PlayerGui.WarnChat.Enabled = true
end
end
return WarnChat
i dont even know why enabling a local script gives error
oh wait forgot to put player.
read what the error says
if something is "index nil" then that means it dosent exist
code works now, but how do i make it custom color. wait lemme see if the tutorial guy mentioned about custom colors
btw will my table function code work?
wait(1)
local warnMsgTABLE = {
"Hide..",
"Run Away",
"He is coming"
}
local warnMsgCount = #warnMsgTABLE
local warnMsg = math.random(1, warnMsgCount)
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(`<font color=#FF0000>{warnMsg}`)
wait afk for 5 or 10 mins
back
lemme see if my code works or not
wait(1)
local warnMsgTABLE = {
"Hide..",
"Run Away",
"He is coming"
}
local warnMsg = Random(warnMsgTABLE)
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(`<font color=#FF0000>{warnMsg}</font>`)
fixed code
bruh
@silver barn any idea on how to fix this? btw i also used table instead of Random but it gave out same error
sorry i didnt respond
its okay
ok
okay it worked but how didnt that html work??
it was supposed to say "Hide.." in color red
i used the code thats identical to the tutorial video but it worked for him and not me
look at his video
v=
game.TextChatService.TextChannels.RBXSystem:DisplaySystemMessage("<font color="rgb(255, 0, 0)">Hello world!</font> ")
copy and paste this
ok
um
oh wait it turned out that i forgot to put this symbol ` between the #FF0000
i mean this symbol '
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(`<font color='#FF0000'>{warnMsg}</font>`)
for some reason discord doesnt mark it as lua coding language bruh