My code in localscript:
local ev = game:GetService("ReplicatedStorage").MainEvents:WaitForChild("OnPlayerKilled")
local ft = require(game:GetService("ReplicatedStorage").MainModules.MainFunctions)
ft.message("Hola mundo", Color3.fromRGB(38, 23, 255), 40)
ev.OnClientEvent:Connect(function(Pname, Kname)
ft.message("Hola mundo", Color3.fromRGB(38, 23, 255), 40)
end)
In my module script:
local a = {}
function a.message(t,c,z)
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = t,
Color = c,
Font = Enum.Font.SourceSansBold,
TextSize = z,
})
end
return a
I tried the code in a game I’m working on recently but it doesn’t work, however I tried it in a game I’ve been testing for a long time and it works.