:SetCore() not working

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

Is it printing anything? e.g. print(‘got the client event’)

yep! it prints everything up to ‘trying to make a system message’

it also prints ‘success’ after the pcall

Maybe look at this? Not sure if this is your issue or not.

1 Like