diff --git a/MainModule/Client/UI/Aero/Console.rbxmx b/MainModule/Client/UI/Aero/Console.rbxmx index 3898430593..56748e9629 100644 --- a/MainModule/Client/UI/Aero/Console.rbxmx +++ b/MainModule/Client/UI/Aero/Console.rbxmx @@ -856,7 +856,15 @@ return function(data, env) if c == 'Text' and text.Text ~= '' and open then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then - text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` + local args = string.split(text.Text, splitKey) + args[#args] = nil + local textWithoutLastArg = table.concat(args, splitKey) + + if textWithoutLastArg ~= "" then + textWithoutLastArg ..= splitKey + end + + text.Text = textWithoutLastArg .. players["Entry 0"].Text .. " " elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else diff --git a/MainModule/Client/UI/Rounded/Console.rbxmx b/MainModule/Client/UI/Rounded/Console.rbxmx index 7fe37cfd5c..95993c1716 100644 --- a/MainModule/Client/UI/Rounded/Console.rbxmx +++ b/MainModule/Client/UI/Rounded/Console.rbxmx @@ -658,7 +658,15 @@ return function(data, env) if c == 'Text' and text.Text ~= '' and open then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then - text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` + local args = string.split(text.Text, splitKey) + args[#args] = nil + local textWithoutLastArg = table.concat(args, splitKey) + + if textWithoutLastArg ~= "" then + textWithoutLastArg ..= splitKey + end + + text.Text = textWithoutLastArg .. players["Entry 0"].Text .. " " elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else diff --git a/MainModule/Client/UI/Steampunk/Console.rbxmx b/MainModule/Client/UI/Steampunk/Console.rbxmx index a396f21c1e..b7d779352c 100644 --- a/MainModule/Client/UI/Steampunk/Console.rbxmx +++ b/MainModule/Client/UI/Steampunk/Console.rbxmx @@ -251,7 +251,15 @@ return function(data, env) if text.Text ~= "" and openConsole then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then - text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` + local args = string.split(text.Text, splitKey) + args[#args] = nil + local textWithoutLastArg = table.concat(args, splitKey) + + if textWithoutLastArg ~= "" then + textWithoutLastArg ..= splitKey + end + + text.Text = textWithoutLastArg .. players["Entry 0"].Text .. " " elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else diff --git a/MainModule/Client/UI/Unity/Console.rbxmx b/MainModule/Client/UI/Unity/Console.rbxmx index ad7aaab422..dd3bd8d439 100644 --- a/MainModule/Client/UI/Unity/Console.rbxmx +++ b/MainModule/Client/UI/Unity/Console.rbxmx @@ -712,7 +712,15 @@ return function(data, env) if c == 'Text' and text.Text ~= '' and open then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then - text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` + local args = string.split(text.Text, splitKey) + args[#args] = nil + local textWithoutLastArg = table.concat(args, splitKey) + + if textWithoutLastArg ~= "" then + textWithoutLastArg ..= splitKey + end + + text.Text = textWithoutLastArg .. players["Entry 0"].Text .. " " elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else diff --git a/MainModule/Client/UI/Windows XP/Console.rbxmx b/MainModule/Client/UI/Windows XP/Console.rbxmx index 80d13ec54a..fef4c60aff 100644 --- a/MainModule/Client/UI/Windows XP/Console.rbxmx +++ b/MainModule/Client/UI/Windows XP/Console.rbxmx @@ -630,7 +630,15 @@ return function(data, env) if c == 'Text' and text.Text ~= '' and open then if string.sub(text.Text, string.len(text.Text)) == " " then if players:FindFirstChild("Entry 0") then - text.Text = `{string.sub(text.Text, 1, (string.len(text.Text) - 1))}{players["Entry 0"].Text} ` + local args = string.split(text.Text, splitKey) + args[#args] = nil + local textWithoutLastArg = table.concat(args, splitKey) + + if textWithoutLastArg ~= "" then + textWithoutLastArg ..= splitKey + end + + text.Text = textWithoutLastArg .. players["Entry 0"].Text .. " " elseif scroll:FindFirstChild("Entry 0") then text.Text = string.split(scroll["Entry 0"].Text, "<")[1] else