How to hide the chat?

I realized it is not relevant at all but maybe he is not using it and he just don’t understand well the english

1 Like

Finally someone who understands my situation here.

1 Like

Ok, let me try it (Im adding this parentesis to fill the needed characters)

Jerry-rigging at its finest‌‌‌‌‌

1 Like

Same bro. As my English is not the best, I depend a lot on the translator, which is a pain for you to be able to understand me.

1 Like

You should probably use google translate and not chatgpt to translate though. Chatgpt isn’t really good when it comes to translating.

1 Like

It continues…
image
aybe other game codes are making this work bad, let me chek

1 Like

In terms of translation, I’m trying to adapt. Thus, I understand what you write, few words I cannot interpret. Then the translator gives me a way of writing that changes when I look elsewhere, but I keep trying, you know?

2 Likes

F. You have SetCore and StarterGui, right? Attempts to set the ChatWindowPosition property to an off-screen position, making the box invisible. (I resend, sorry)

2 Likes

Não sei se você entendeu totalmente o que escrevi, mas o que estou dizendo é para usar o google translate e não o Chatgpt. This is your language I believe so I hope you can understand better.

Edit: I didn’t read this correctly I read that you didn’t understand what I wrote.

2 Likes

No, I used StarterGui:SetCoreGuiEnabled()

1 Like

Ahh, entendi. Não, sim. Eu ainda não entendo um pouco essa questão de tradução dos códigos, eu mantenho como ficou para mim. Ou seja, vamos dizer que na caixa de “damageType” eu coloquei uma anotação que “Ele leva dano de queda”, então eu acabo re-enviando, mas deixo passar muitas coisas. Comecei agora pouco, então eu estou fazendo um derivado enorme de códigos.

1 Like

Any updates whether there are conflicting scripts?

1 Like

tudo bem, todo mundo tem que começar em algum lugar para tudo que requer habilidade.

2 Likes

I cheked all and I never use in other place StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat) so Is imposible it to be the problem. Idk what more to try… I will just continue triying stupid things to see it works (like try to disable the chat multiple times or stuff like that).

Ao traduzir o código, basta colocá-lo no Google Tradutor, pois é bastante confiável ao traduzir palavras do português para o inglês.

1 Like

HEY, IT WORKED!
CODE:

local players = game:GetService("Players")
local LPlayer = players.LocalPlayer
local UserInputS = game:GetService("UserInputService")
local Gui = script.Parent
local MainF = Gui:WaitForChild("MainFrame")
local Typer = MainF:WaitForChild("Typer")
local SendB = Typer:WaitForChild("Send")
local MessageS = MainF:WaitForChild("MessagesScrolling")
local StarterGui = game:GetService("StarterGui")
local MessagesNum = 0

local TextChatS = game:GetService("TextChatService")
local Channel:TextChannel = TextChatS:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
local TextS = game:GetService("TextService")

local ToCloneF = script:WaitForChild("TextFrame")
local ToCloneMessage = script:WaitForChild("Message1")
local SizeOfSrolling = 0

local MessagesT = {}
for i = 1, 50, 1 do
	table.insert(MessagesT, 0)
end

function GetColorByNumber(Number)
	local StringS = string.split(tostring(Number), "")
	local R = StringS[#StringS-2]
	local G = StringS[#StringS-1]
	local B = StringS[#StringS]
	local ToReturn = Color3.fromRGB(tonumber(R)*28.33, tonumber(G)*28.33, tonumber(B)*28.33)
	return ToReturn
end


UserInputS.InputBegan:Connect(function(input, impedido)
	if input.KeyCode == Enum.KeyCode.C and not impedido then
		Typer:CaptureFocus()
	end
end)

Typer.FocusLost:Connect(function(Enter)
	if Enter then
		Channel:SendAsync(Typer.Text)
	end
end)

SendB.MouseButton1Click:Connect(function()
	Channel:SendAsync(Typer.Text)
end)

Channel.MessageReceived:Connect(function(IncomingMessage)
	local TotalContainerSize = 294
	local MessageF = ToCloneF:Clone()
	MessagesNum += 1
	MessageF.LayoutOrder = MessagesNum
	MessageF.Parent = MessageS
	local SenderUserId = IncomingMessage.TextSource.UserId
	MessageF.UsernameTL.Text = " ["..players:GetPlayerByUserId(SenderUserId).Name.."]: "
	MessageF.UsernameTL.TextColor3 = GetColorByNumber(SenderUserId)
	local NumOfMessage = 1
	local StringS = IncomingMessage.Text:split(" ")
	local TextBoundsX = MessageF.UsernameTL.TextBounds.X
	MessageF.UsernameTL.Size = UDim2.fromOffset(TextBoundsX, 20)
	local TextBoundsY = 0
	for i, Word in pairs(StringS) do
		local TextL = ToCloneMessage:Clone()
		local Prefix = Word:split("")[1]
		if Prefix == "!" then
			TextL.FontFace = Font.new(Enum.Font.FredokaOne.Name, Enum.FontWeight.Bold)
			Word = Word:gsub("!", "")
		elseif Prefix == "_" then
			TextL.Font = Enum.Font.Code
			Word = Word:gsub("_", "")
		elseif Prefix == "*" then
			TextL.FontFace = Font.new(Enum.Font.FredokaOne.Name, Enum.FontWeight.Regular, Enum.FontStyle.Italic)
			Word = Word:gsub("*", "")
		end
		TextL.Text = Word.." "
		TextL.Name = Word
		TextL.Parent = MessageF
		local Needed = TextL.TextBounds.X
		TextL.Size = UDim2.fromOffset(Needed, 20)
		if TextBoundsX +Needed > TotalContainerSize then
			TextBoundsX = 0
			TextBoundsY += 20
		end
		TextL.Position = UDim2.fromOffset(TextBoundsX, TextBoundsY)
		TextBoundsX += Needed
	end
	SizeOfSrolling += TextBoundsY +25
	MessageS.CanvasSize = UDim2.fromOffset(0,SizeOfSrolling)
	MessageF.Size = UDim2.new(1,-6,0, TextBoundsY+20)
	table.insert(MessagesT, MessageF)
	local MessageToDelete = MessagesT[1]
	table.remove(MessagesT, 1)
	if MessageToDelete ~= 0 then
		SizeOfSrolling -= MessageToDelete.Size.Y.Offset
		MessageToDelete:Destroy()
		MessageS.CanvasSize = SizeOfSrolling
	end
	Typer.Text = ""
end)

for i = 50, 1, -1 do
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
	wait(1)
end

Result:
image
Thanks @Quwanterz for the idea!

3 Likes

Do you know what was causing the issue?

1 Like

I think that it is that the new chat needs time to inizializate and I disabled it before it inizializated. Anyways. Solution: Repeat it 50 times.

It is shaming that the solution were that easy but no, I won’t delete it.