How do I make this detect the message even if It's in all capitals/lowercase?

I am trying to make this work so that it still detects the message even if it’s in all lowercase and upercase.

Script:

local status1 = {"FREE TIME", "ENJOY YOUR FREE TIME, HANG OUT WITH FELLOW INMATES, OR GO ON THE YARD"}
local status2 = {"Status name", "status description"}
local status3 = {"Status name", "status description"}
local status4 = {"Status name", "status description"}
local status5 = {"Status name", "status description"}
local status6 = {"Status name", "status description"}
local prefix = "!"

game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(msg)
		if msg == prefix..status1[1] then
			game.ReplicatedStorage.changeStatus:FireAllClients(status1[1], status1[2])
		end
	end)
end)

Use this on the player message.

lmsg = string.lower(msg)

,

msg:lower()

is also a good option.

Convert the msg into all lowercase and then check using the == operator
msg:lower()
( msg:lower == prefix…status[1]:lower() )

local status1 = {"FREE TIME", "ENJOY YOUR FREE TIME, HANG OUT WITH FELLOW INMATES, OR GO ON THE YARD"}
local status2 = {"Status name", "status description"}
local status3 = {"Status name", "status description"}
local status4 = {"Status name", "status description"}
local status5 = {"Status name", "status description"}
local status6 = {"Status name", "status description"}
local prefix = "!"

game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(msg)
		local lmsg = string.lower(msg)
		if lmsg == prefix..status1[1] then
			game.ReplicatedStorage.changeStatus:FireAllClients(status1[1], status1[2])
		end
	end)
end)

This is what I have now, and it doesn’t work.

That’s because status[1] has capitals in it. You’ll probably want to do string.lower(status[1]) as well.