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

Server Message System prints Output but doesn't appear?

Asked by 5 years ago

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")
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. chaos2022 43 — 5y
0
Oh.. rochel89 42 — 5y

1 answer

Log in to vote
0
Answered by
popeeyy 493 Moderation Voter
5 years ago

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.

0
sadly it didn't work,The output still prints "It worked" though. rochel89 42 — 5y
Ad

Answer this question