So basically, I am scripting some admin commands for an upcoming USM group I am going to make, but the message command, shows my message as all lowercase instead of how the message actually is. Code:
local Core = require(script.Parent.Parent.Core)
return {
Usages = {"m", "message"},
Callback = function(sender, args)
if Core.GetLevel(sender) >= 1 then
local msg = table.concat(args, " ")
local filteredmsg = game.Chat:FilterStringForBroadcast(msg, sender)
local AnimateUI = require(game.ReplicatedStorage:WaitForChild("AdminNetwork"):WaitForChild("AnimateUI"))
for i,v in pairs(game.Players:GetPlayers()) do
local UI = script.Parent.Parent:WaitForChild("UIPieces"):WaitForChild("MessageUI"):Clone()
UI.Parent = v:WaitForChild("PlayerGui")
UI.Frame.Title.Text = "ANNOUNCEMENT FROM "..string.upper(sender.Name)
UI.Frame.Visible = true
UI.Frame:TweenPosition(UDim2.new(0.296, 0, 0.017, 0))
AnimateUI.typeWrite(UI.Frame.Message, filteredmsg, 0.06)
wait(8)
UI.Frame:TweenPosition(UDim2.new(0.296, 0, -0.199, 0))
wait(1)
UI:Destroy()
end
else
local UI = script.Parent.Parent:WaitForChild("UIPieces"):WaitForChild("NotificationUI"):Clone()
UI.Parent = sender:WaitForChild("PlayerGui")
UI.Notification.Frame.Visible = true
UI.Notification.Frame.Description.Text = "You do not have permission to use this command."
UI.Notification.MouseButton1Click:Connect(function()
UI:Destroy()
end)
end
end
}
local LocalizationService = game:GetService("LocalizationService")
local Players = game:GetService("Players")
local SOURCE_LOCALE = "en"
local translator = nil
local AnimateUI = {}
function AnimateUI.loadTranslator()
pcall(function()
translator = LocalizationService:GetTranslatorForPlayerAsync(Players.LocalPlayer)
end)
if not translator then
pcall(function()
translator = LocalizationService:GetTranslatorForLocaleAsync(SOURCE_LOCALE)
end)
end
end
function AnimateUI.typeWrite(guiObject, text, delayBetweenChars)
guiObject.Visible = true
guiObject.AutoLocalize = false
local displayText = text
if translator then
displayText = translator:Translate(guiObject, text)
end
displayText = displayText:gsub("<br%s*/>", "\n")
displayText:gsub("<[^<>]->", "")
guiObject.Text = displayText
local index = 0
for first, last in utf8.graphemes(displayText) do
index = index + 1
guiObject.MaxVisibleGraphemes = index
wait(delayBetweenChars)
end
end
return AnimateUI
I have used the AnimateUI module from roblox before and it showed my texts like normal for a previous script I made, now it’s causing me issues.