Hi,
I’d like to send a message whenever a player touches a checkpoint, but it is not working.
chatMessage.OnClientEvent:Connect(function(playerName, stageName, color)
print('got the client event')
print(playerName, stageName, color)
if playerName == plr then
local succ, err = pcall(function()
print('trying to make system message')
game:FindFirstChild("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "You have reached the " ..stageName.. " stage!",
Color = Color3.new(0.207843, 0.32549, 1),
Font = Enum.Font.SourceSans,
TextSize = 18
})
end)
if succ then
print('Success!')
else
print(err)
end
else
it never prints the chat message in the chat.
this is from a local script.
no errors in the output