still new to scripting in Roblox this is a local script in StarterGui. I am getting the print(message) in the output, but I am not seeing the announcement its suppose to be displaying.
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = replicatedStorage:WaitForChild("RemoteEvent")
remoteEvent.OnClientEvent:Connect(function(message)
print(message)
local success, err = pcall(function()
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = message,
Color = Color3.fromRGB(255, 255, 0), -- Yellow color
Font = Enum.Font.SourceSansBold,
FontSize = Enum.FontSize.Size24
})
end)
if not success then
warn("Failed to set system message: " .. tostring(err))
end
end)