Need help with Tables/Messaging Service

Hi there! I am making a small system that broadcasts accross servers when a training is being held but I am a bit stuck… I want it so basically when i set everything to "false" it displays info = {"N/A","N/A","No Current Training."} but when i try that it just displays false for everything

local MessageSvc = game:GetService("MessagingService")
local NoTrainingSet = {"false","false","false"}

MessageSvc:SubscribeAsync("Training",function(message)
	local info = message.Data
	print(info)
	print(NoTrainingSet)
	if info == NoTrainingSet then
		info = {"N/A","N/A","No Current Training."}
		print(info)
	end
	for _,v in pairs(game.Players:GetChildren()) do
		v.PlayerGui.TransitSystem.TrainingGUI.TrainingGUI.HOSTNAME.Text = info[1]
		v.PlayerGui.TransitSystem.TrainingGUI.TrainingGUI.TIME.Text = info[2]
		v.PlayerGui.TransitSystem.TrainingGUI.TrainingGUI.ExtraInformation.Text = info[3]
	end
end)

Am I missing something?

From what I could tell with a bit of quick research, the way you checked if the info and NoTrainingSet tables are equal is not how you’re supposed to do it, which is probably why it’s reading false for all the values instead of what you wanted it to do.

I found a devforum post that describes how you are to go about this, I hope this will be of help to you:

https://devforum.roblox.com/t/how-do-i-check-if-2-tables-have-the-same-content-in-them-if-theyre-not-in-the-same-order/975796

The solution provided in that post mentions how you can check if they’re both exactly the same, which I don’t think will matter for what you want since all the values in NoTrainningSet are false