How to add a text to a function?

How can I add a message to the following code? previously, the message was when sending the “FireClient”, but I wanted to translate the game so I have to do it now from the “OnServerEvent” but it simply gives an error

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local player = Players.LocalPlayer
local killfeedEvent = ReplicatedStorage.KillfeedEvent

local template = script.Parent:WaitForChild("template")

local killfeedModule = require(script.Parent.Parent.Parent:WaitForChild("Killfeed"))

local killfeed = killfeedModule:New(template)

local SettingsData = player:WaitForChild("SettingsData")
local GameSettings = SettingsData:WaitForChild("GameSettings")
local LenguajeValue = GameSettings:WaitForChild("Language")

local Act = nil

killfeedEvent.OnClientEvent:Connect(function(str, action)

	if LenguajeValue.Value == "Spanish" then
		if action == "Joined" then
			Act = " se unió al juego"
		elseif action == "Leave" then
			Act = " ha salidó del juego"
		end
	elseif LenguajeValue.Value == "English" then
		if action == "Joined" then
			Act = " joined the game"
		elseif action == "Leave" then
			Act = " Got out of the game"
		end
	end
	killfeed = killfeed + str.. Act
	wait()
	Act = nil
end)

Not enough context here. What error are you getting and what does the line of code look like for the server that’s firing the client? Both halves need to be provided for networking help.

Basically it is like a list of players who have entered and left. If I log in, the game will send a “FireAllClients” with the name of the player who entered (previously it was “FireAllClients (player …” joined the game "), so it would appear in the list with his name and if he left or entered to the game). Now since I wanted to manually translate the game, I need to put it in Spanish and English (it depends on how the player configures it since I put a configuration menu) and so that they do not get the language that they did not choose, I decided to put it in the “OnServerEvent”