How would i make it so if someone says “hello” it would automatically be send as “Hello.” instead.
Sort-of autocorrection but like, not entirely. I have no idea how i should do this but- Maybe one of ya do!
So basically every sentence should start with a capital letter and end with a “.”
Thank!
You mean here?
Replace the entirely of messageObject.Message with
message:gsub("^%l",function(a) return a:upper() end):gsub("[^%.]$",function(a) return a…"." end)?
(Sorry if i sound stupid lmfao, I’m just don’t really understand the chatService
local function UpdateTextFunction(messageObject)
if messageData.IsFiltered then
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. BaseMessage.Message:gsub("^%l",function(a) return a:upper() end):gsub("[^%.]$",function(a) return a.."." end)
else
local messageLength = messageObject.MessageLengthUtf8 or messageObject.MessageLength
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. string.rep("_", messageLength)
end
end
local function UpdateTextFunction(messageObject)
if messageData.IsFiltered then
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. BaseMessage.Text:gsub("^%l",function(a) return a:upper() end):gsub("[^%.]$",function(a) return a.."." end)
else
local messageLength = messageObject.MessageLengthUtf8 or messageObject.MessageLength
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. string.rep("_", messageLength)
end
end
I dont really use modified chat, but you could try this:
local function UpdateTextFunction(messageObject)
if messageData.IsFiltered then
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. BaseMessage.Text:gsub("^%l",function(a) return a:upper() end):gsub("[^%.]$",function(a) return a.."." end)
else
local messageLength = messageObject.MessageLengthUtf8 or messageObject.MessageLength
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. string.rep("_", messageLength)
end
return BaseMessage.Text
end
local function UpdateTextFunction(messageObject)
if messageData.IsFiltered then
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. messageObject.Message:gsub("^%l",function(a) return a:upper() end):gsub("[^%.]$",function(a) return a.."." end)
else
local messageLength = messageObject.MessageLengthUtf8 or messageObject.MessageLength
BaseMessage.Text = string.rep(" ", numNeededSpaces) .. string.rep("_", messageLength)
end
end