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:
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("PlayerJoinedorRemoved")
RemoteEvent.OnClientEvent:Connect(function(playerToDisplay,action)
if action == "Joined" then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = ("[SYSTEM] "..playerToDisplay.Name.." has joined the server.");
Color = Color3.fromRGB(97, 255, 142);
Font = Enum.Font.SourceSansBold;
FontSize = Enum.FontSize.Size12
})
elseif action == "Left" then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = ("[SYSTEM] "..playerToDisplay.Name.." has left the server.");
Color = Color3.fromRGB(255, 51, 71);
Font = Enum.Font.SourceSansBold;
FontSize = Enum.FontSize.Size12
})
end
end)
Server Script:
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("PlayerJoinedorRemoved")
Players.PlayerAdded:Connect(function(playerAdded)
RemoteEvent:FireAllClients(playerAdded,"Joined")
end)
Players.PlayerRemoving:Connect(function(playerRemoved)
RemoteEvent:FireAllClients(playerRemoved,"Left")
end)

1 comment
I read the wiki about this and when i used TextSize and the enum the text was very small, pixels basically. I didnt know that an integer was a number thanks!