How come this doesn’t work at all no errors in the output, it prints Successfuly Registered but it doesn’t show a message on the chat
local SetCoreHolder = require(Core.SetCore)
Remote.Winner.OnClientEvent:Connect(function()
SetCoreHolder.SetCore("ChatMakeSystemMessage", {
Text = "[Server]: "..ClienPlayer.Name.." made it to the end!";
Color = Color3.fromRGB(222, 222, 222);
Font = Font.fromEnum(Enum.Font.FredokaOne);
TextSize = 10;
})
end)
here’s the core module:
local StarterGui = game:GetService("StarterGui")
local Core = {}
Core.Settings = {
SetCore = {
Tries = 0;
MaxAttempts = 10;
};
}
function Core.SetCore(MethodName: string, SetProperty)
while (Core.Settings.SetCore.Tries < Core.Settings.SetCore.MaxAttempts) do
local success, result = pcall(function()
StarterGui:SetCore(MethodName, SetProperty)
end)
if success then
print("Successfully Registered")
Core.Settings.SetCore.Tries = 0
break
else
Core.Settings.SetCore.Tries += 1
if Core.Settings.SetCore.Tries == Core.Settings.SetCore.MaxAttempts then
error("Error calling SetCore "..MethodName..": "..result)
else
task.wait()
end
end
end
end
return Core