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

SetCore: ChatMakeSystemMessage not working?

Asked by
P100D 590 Moderation Voter
8 years ago

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?

2
> Roblox broke something again. User#6546 35 — 8y
0
Are you seeing this error in Studio Test mode, Studio Server mode, or in a live server? M39a9am3R 3210 — 8y
0
Hi there, surprisingly i had the same problem and it took me a whole darn 20 minutes to figure out what the heck went wrong. I feel quite silly now, to anyone still having this problem..a simple wait() at the beginning will fix that error no problem. EtherealTrin 45 — 5y

1 answer

Log in to vote
1
Answered by 8 years ago

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

0
Still same error, even with the added properties. Remember, they default to Source Sams Bold and size 18. P100D 590 — 8y
Ad

Answer this question