Help with JJ system

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Attempting to make a system where if a player sends a message that’s on a table, a variable goes up.

  2. What is the issue? Nothing is happening even when the word matches the one on the table.

  3. What solutions have you tried so far? Devhub, youtube

Table

MainConfig.Word2Number= {
	["zero"]=0,
	["one"]=1,
	["two"]=2,
	["three"]=3,
	["four"]=4,
	["five"]=5,
	["six"]=6,
	["seven"]=7,
	["eight"]=8,
	["nine"]=9,
	["ten"]=10,
	["eleven"]=11,
	["twelve"]=12,
	["thirteen"]=13,
	["fourteen"]=14,
	["fifteen"]=15,
	["sixteen"]=16,
	["seventeen"]=17,
	["eighteen"]=18,
	["nineteen"]=19,
	["twenty"]=20,
	["twenty-one"]=21,
	["twenty-two"]=22,
	["twenty-three"]=23,
	["twenty-four"]=24,
	["twenty-five"]=25,
	["twenty-six"]=26,
	["twenty-seven"]=27,
	["twenty-eight"]=28,
	["twenty-nine"]=29,
	["thirty"]=30,
	["thirty-one"]=31,
	["thirty-two" ]=32,
	["thirty-three" ]=33,
	["thirty-four"]=34,
	["thirty-five"]=35,
	["thirty-six"]=36,
	["thirty-seven"]=37,
	["thirty-eight"]=38,
	["thirty-nine"]=39,
	["forty"]=40,
	["forty-one"]=41,
	["forty-two"]=42,
	["forty-three"]=43,
	["forty-four"]=44,
	["forty-five"]=45,
	["forty-six"]=46,
	["forty-seven"]=47,
	["forty-eight"]=48,
	["forty-nine"]=49,
	["fifty"]=5

Script

game.ReplicatedStorage.RemoteEvents.JJs.OnServerEvent:Connect(function(player, msg)
			print(msg)
			if msg == "msg" then
				local character = player.Character or player.CharacterAdded:wait()
		character.HumanoidRootPart.CFrame = game.Workspace.PS.Part1.CFrame
		player.PlayerGui.MainGui.JJs.JJs.Text = "CURRENT JJs: 0"
				player.PlayerGui.MainGui.IntroUi.Visible = false
				player.PlayerGui.MainGui.JJs.Visible = true
				wait(.5)
				
			else
			local split = string.split(msg, "!")
			local word = split[1]
		local lowered = string.lower(word)
		for i, v in pairs(config.Word2Number) do
			if word == i then -- this Is the part that isn't working
				print('word matches1')
			
			if JJs == v - 1 then
				print('word matches')
				JJs = JJs + 1
				print(JJs)
					player.PlayerGui.MainGui.JJs.JJs.Text = "CURRENT JJs: "..JJs
				end
		end
		
			
					end
				
				end
			
		

	end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

It should be local word = split[2] because the first split would be “”.

Oh god. The table, the formatting…

Split 2 prints nothing while split 1 prints the word