I am trying to send a message to the chat. The following code is in a LocalScript in StarterGui:
function game.Workspace.RemoteFunction.OnClientInvoke(killer, player) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = (killer.Name .. " killed " .. player.Name); Color = killer.TeamColor; }) end
However, whenever it runs I get the following error:
SetCore: ChatMakeSystemMessage has not been registered by the CoreScripts
I did exactly what the wiki page said, but obviously it's not working. What am I doing wrong?
I belive you didn't use the full table.
As the wiki says, you should include font and font size.
Lets say to make this size 18px and bold, we would,
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = "Your data has been saved"; Color = Color3.new(0/255, 128/255, 0/255); Font = Enum.Font.SourceSansBold; FontSize = Enum.FontSize.Size18; })
And in your case,
function game.Workspace.RemoteFunction.OnClientInvoke(killer, player) game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{ Text = (killer.Name .. " killed " .. player.Name); Color = killer.TeamColor; Font = Enum.Font.SourceSansBold; --If you want it bold FontSize = Enum.FontSize.Size18; }) end
Hope I helped!
TheHospitalDev
For more help, Visit the wiki