Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Server Message System prints Output but doesn't appear?

It printed "It worked" but It doesn't pop up.Its supposed to pop up in the Chat. I put it in StarterPlayerScripts. Is there something wrong?

bc = BrickColor.new("Really red")
local Players = game:GetService("Players")
function onPlayerAdded(player)
     game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
        Text = "[System]Hello!";
        Color = bc.Color;
        Font = Enum.Font.Cartoon;
        FontSize = Enum.FontSize.Size96;
    })
end
print("It worked")

2 comments

0

it print "It worked" because it's after the function, if you put it before the end it shouldn't work if an error occurred or it's just not activated.

0

Oh..

1 answer

You never call the onPlayerAdded function in your code. Make a LocalScript with the following code and it will call the function when the player joins:

local bc = BrickColor.new("Really red")
local Players = game:GetService("Players")

function onPlayerAdded(player)
     game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
        Text = "[System]Hello!";
        Color = bc.Color;
        Font = Enum.Font.Cartoon;
        FontSize = Enum.FontSize.Size96;
    })
end

onPlayerAdded(game.Players.LocalPlayer)
print("It worked")

Let me know if you have any issues or questions in the comments below.

1 comment

0

sadly it didn't work,The output still prints "It worked" though.

This discussion is preserved as it was. New answers, comments, and votes are closed.