I'm making a anti capital system, it's supposed to kick someone when they speak in all caps, but I'm using the pattern "%u+" which only gets the first word. I want it to get the full sentence of what they have said.
I want it to check the whole sentence and check if it's in capitals, if it is then kick them
Heres my code
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
local checkIfUpercase = string.match(msg, "%u+")
print(checkIfUpercase)
if string.upper(msg) == checkIfUpercase then
player:Kick("Don't speak in all capitials!")
end
end)
end)
I'm guessing theres a different pattern I need to use, but idk.
