Reversing player chat

when arabic players play a game and then they talk on the chat the roblox chat system reverses the players message like if you say “HI my name is printer” it will make it
“printer is name my HI”
so how to fix that?

I dont think there is need to fix that as arabic words are written and read from right to left.

local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

ChatService:RegisterFilterMessageFunction("editText", function(Speaker, MessageObject, ChannelName)
	local ReversedWords = {}
	local Words = MessageObject.Message:split(" ")
	for Index =  1, #Words do
		ReversedWords[(#Words + 1) - Index] = Words[Index]
	end
	MessageObject.Message = table.concat(ReversedWords, " ")
end)

this is not the best way of reversing a message without reversing the characters of the words
because i only use the white space as a separator then reversing the table which is the table of separated strings returned from separating the string

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.