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)