Why aren't my system messages' FontSize changing?
Asked by
4 years ago Edited 4 years ago
Hello all, I have some code that is supposed to send a system message in the chat about who the player is and if they joined or left.
Now, the FontSize in the OnClientEvent
in the LocalScript isn't changing. I know that the default value is 18, but I set it to Size12 on Line 13 and it didn't change the size.
Is this because of the parameters or the arguments or something?
LocalScript:
01 | local StarterGui = game:GetService( "StarterGui" ) |
02 | local Players = game:GetService( "Players" ) |
03 | local Player = Players.LocalPlayer |
04 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
05 | local RemoteEvent = ReplicatedStorage:WaitForChild( "PlayerJoinedorRemoved" ) |
07 | RemoteEvent.OnClientEvent:Connect( function (playerToDisplay,action) |
08 | if action = = "Joined" then |
09 | game.StarterGui:SetCore( "ChatMakeSystemMessage" , { |
10 | Text = ( "[SYSTEM] " ..playerToDisplay.Name.. " has joined the server." ); |
11 | Color = Color 3. fromRGB( 97 , 255 , 142 ); |
12 | Font = Enum.Font.SourceSansBold; |
13 | FontSize = Enum.FontSize.Size 12 |
16 | elseif action = = "Left" then |
17 | game.StarterGui:SetCore( "ChatMakeSystemMessage" , { |
18 | Text = ( "[SYSTEM] " ..playerToDisplay.Name.. " has left the server." ); |
19 | Color = Color 3. fromRGB( 255 , 51 , 71 ); |
20 | Font = Enum.Font.SourceSansBold; |
21 | FontSize = Enum.FontSize.Size 12 |
Server Script:
01 | local Players = game:GetService( "Players" ) |
02 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
03 | local RemoteEvent = ReplicatedStorage:WaitForChild( "PlayerJoinedorRemoved" ) |
05 | Players.PlayerAdded:Connect( function (playerAdded) |
06 | RemoteEvent:FireAllClients(playerAdded, "Joined" ) |
09 | Players.PlayerRemoving:Connect( function (playerRemoved) |
10 | RemoteEvent:FireAllClients(playerRemoved, "Left" ) |