I have “for i” cycle which creates screen keyboard from table with russian characters.
here’s my code:
local TweenService = game:GetService("TweenService")
-----------------------------------------------
local gui = script.Parent
local frame = gui.CharactersFrame
-----------------------------------------------
local englishCharacters = {
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K",
"L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V",
"W", "X", "Y", "Z"
}
local russianCharacters = {
"A", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К",
"Л", "М", "Н", "О", "П", "Р", "С", "Т", "У", "Ф", "Х",
"Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь", "Э", "Ю", "Я"
}
local enteredColor = Color3.new(0.623529, 0.623529, 0.623529)
local pressedColor = Color3.new(1, 1, 0)
-----------------------------------------------
local function tweenColor(button: TextButton, color)
TweenService:Create(button, TweenInfo.new(0.05), {BackgroundColor3 = color}):Play()
end
-----------------------------------------------
for i, v in pairs(russianCharacters) do
local clone = script.CharacterButton:Clone()
clone.Text = v:lower()
local mainColor = clone.BackgroundColor3
local enterFunction = clone.MouseEnter:Connect(function()
tweenColor(clone, enteredColor)
end)
local leavedFunction = clone.MouseLeave:Connect(function()
tweenColor(clone, mainColor)
end)
clone.MouseButton1Click:Connect(function()
--enteredColor:Disconnect()
--leavedFunction:Disconnect()
clone.BackgroundColor3 = pressedColor
task.delay(0.1, function()
clone.BackgroundColor3 = mainColor
end)
end)
clone.Parent = frame
end
And here’s the result:
Only first character was lowered (The :upper() method has the same result)
It looks like problems woth non-ASCII characters? but idk how to fix it.