I have a join and leave script, but it wont work what happened?
Asked by
5 years ago Edited 5 years ago
---Important Things---
So I have a join and leave script with 4 important things.
The first thing is a Remote Event named Added.
The second thing is a Remote Event named Removing.
The third thing is a script named Added/Removing.
The fourth and final thing is a script name Message.
The Join and the Message should show up in the chat.
---Locations---
-The Added Event is in Replicated Storage.
-The Removing Event is in the Replicated Storage.
-The Added/Removing Script is in the Workspace.
-The Message Script is in the StarterGui.
---Problem---
Players.vincentthecat1.PlayerGui.Message:9: '}' expected (to close '{' at line 5) near 'FontSize'
---Added/Removing Script---
1 | local events = game.ReplicatedStorage.Events |
3 | game.Players.PlayerAdded:connect( function (plr) |
4 | events.Added:FireAllClients(plr) |
7 | game.Players.PlayerAdded:connect( function (plr) |
8 | events.Removing:FireAllClients(plr) |
---Message Script---
01 | local events = game.ReplicatedStorage.Events |
02 | local starterGui = game.StarterGui |
04 | events.Added.OnClientEvent:connect( function (plr) |
05 | starterGui:SetCore( "ChatMakeSystemMessage" , { |
06 | Text = plr.Name.. " has joined the game!" ; |
07 | Color = Color 3. fromRGB( 0 , 255 , 255 ); |
08 | Font = Enum.Font.SourceSansBold |
09 | FontSize = Enum.FontSize.Size 32 ; |
13 | events.Removing.OnClientEvent:connect( function (plr) |
14 | starterGui:SetCore( "ChatMakeSystemMessage" , { |
15 | Text = plr.Name.. " has left the game!" ; |
16 | Color = Color 3. fromRGB( 0 , 255 , 255 ); |
17 | Font = Enum.Font.SourceSansBold |
18 | FontSize = Enum.FontSize.Size 32 ; |