The title is pretty self-explanatory, but I’ve been trying to find a way to get the transparency of the physical chat window. I know it’s possible to set the transparency of each individual element, but I’m more talking about getting the transparency of it while it’s fading away because of inactivity and when it fades back in. Any help would be appreciated greatly, thanks so much!
I never tried something like this but maybe you can reference CoreGUI?
local Chat = game:GetService("CoreGui"):WaitForChild("Chat")
local ChatFrame = Chat:WaitForChild("ChatFrame")
local function onVisibilityChanged()
if ChatFrame.Visible then
print("Chat is visible")
else
print("Chat is not visible")
end
end
ChatFrame:GetPropertyChangedSignal("Visible"):Connect(onVisibilityChanged)
This is what I first tried, but CoreGui is restricted to plugins because it contains the internal Roblox UIs, so it can’t be accessed.
Oooo look at what i found, could this help you?
local StarterGui = game:GetService("StarterGui")
print(StarterGui:GetCoreGuiEnabled("PlayerList")) -- Replace with ChatFrame?
I don’t really get what you mean right here. If it’s getting the transparency of the window with a normal script then thats not possible since the coregui is robloxlocked.
edit: i just wanna know if its getting the transparency manually or automatically
I released an open source implementation of TextChatSevice that allows you to do exactly that.
OpenTextChatService - Open-Source Implementation of TextChatService
My reply to the topic below includes an example of how to use the “ChatBackgroundFaded” and “ChatBackgroundTransparency” property I’ve included . Hope this works for you.
That’s amazing, I’ll be sure to check it out. If I end up switching to it, would it still work the same as the standard one, just with extra features, or would there be a lot of migration work (not that I mind it)?
I’ve made it super easy to switch over, it’s pretty much “drag and drop”. All you have to do is replace client instances of game:GetService(“TextChatService”)
with require(pathToOpenTextChatService)
. It will work exactly the same as TextChatService, with the exception of being rendered by the developer. It also has additional properties and methods like the ones I mentioned above.
That’s amazing! Sorry to keep prodding, but would typical custom chat configs like chat color and gradient stuff work as well and be hooked through the same functions? Here’s what I mean:
local TextChatService = game:GetService("TextChatService")
TextChatService.OnChatWindowAdded:Connect(function(Source)
--modify here
end)
Absolutely . That’s the best part, OpenTextChatService behaves exactly like TextChatSevice, only adding additional features on top of what TextChatService already offers (So yes, any callbacks you define will work, including styling). Any experience should be able to switch over to OpenTextChatService without changing their code base. There is a small caveat when it comes to parenting instances as mentioned in the forum post, but otherwise works the exact same.
Edit: Any limitations are also highlighted in the post as not to be misleading. It is a faithful recreation and implementation.
From what I’m seeing right now, it’s awesome! I’m so glad you’ve implemented this. The only comment I’d like to make known is that in some cases you call functions using a period instead of a colon and don’t provide self as input which ends up erroring. You should be able to find it in the cleanup function callstack. Thanks so much!
Glad I could help, and great catch! I’ll publish a fix now