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 7 years ago
Edited 7 years ago

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


function Join(plr) game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SERVER] :: "..plr.Name.." Joined the server!"; Color = Color3.fromRGB(220, 180, 58); Font = Enum.Font.ArialBold; FontSize = Enum.FontSize.Size18; }) end game.Players.PlayerAdded:connect(Join) function Leave(plr) game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SERVER] :: "..plr.Name.." Left the server!"; Color = Color3.fromRGB(220, 180, 58); Font = Enum.Font.ArialBold; FontSize = Enum.FontSize.Size18; }) end game.Players.PlayerRemoving:connect(Leave)

2 answers

Log in to vote
0
Answered by 7 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 — 7y
Ad
Log in to vote
-2
Answered by 7 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 — 7y
0
If you're not posting an explanation use comments. Goulstem 8144 — 7y

Answer this question