Im trying to make a chat box that you can only see and type in this GUI im making. I have the basic layout:
StarterGui - ScreenGui(Named Global) - TextButton(Named General) - LocalScript and ScrollableFrame and in the frame a TextBox.
I need the TextButton (General) to be the one that toggles the Frame which then visible = true on TextBox...
Heres my code thats in the local script.
local scriptParent = game.StarterGui.GlobalChat.General
local ToggleButton = game.StarterGui.GlobalChat.General
local chatbox = game.StarterGui.GlobalChat.General.ChatBox
local chattype = game.StarterGui.GlobalChat.General.ChatType
ToggleButton.MouseButton1Down:connect(function()
if chatbox.Visible then
chatbox.Visible = false
else
chatbox.Visible = true
end
end)
Thanks :)

2 comments
Not sure if this is what you were asking for and I can't test it really, but I attempted to fix the code up however I could
Hi! Thank you for your reply! It does work for the first part (It opens) but it dosent close...