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

Why does this chat message script not work in a server but works in studio mode?

Asked by 8 years ago
Edited 8 years ago

This is my script, it works in studio but doesn't work in studio. Please help.

01function Join(plr)
02 
03game.StarterGui:SetCore("ChatMakeSystemMessage", {
04Text = "[SERVER] :: "..plr.Name.." Joined the server!";
05Color = Color3.fromRGB(220, 180, 58);
06Font = Enum.Font.ArialBold;
07FontSize = Enum.FontSize.Size18;
08})
09end
10game.Players.PlayerAdded:connect(Join)
11 
12function Leave(plr)
13game.StarterGui:SetCore("ChatMakeSystemMessage", {
14Text = "[SERVER] :: "..plr.Name.." Left the server!";
15Color = Color3.fromRGB(220, 180, 58);
16Font = Enum.Font.ArialBold;
17FontSize = Enum.FontSize.Size18;
18})
19end
20game.Players.PlayerRemoving:connect(Leave)

2 answers

Log in to vote
0
Answered by 8 years ago

I saw you commented that it was a server script in workspace. Try moving the script to ServerScriptService - depending on where a script is it might not execute.

0
I will try this, I will tell reply if it works. FlamingGamez 15 — 8y
Ad
Log in to vote
-2
Answered by 8 years ago

is it a global script? and is there a function called leave

0
Its a global script, in workspace. Function called leave is line 12 FlamingGamez 15 — 8y
0
If you're not posting an explanation use comments. Goulstem 8144 — 8y

Answer this question