I’m trying to change the properties of the chat window. For some reason, this script isn’t working:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatSettingsRemote = ReplicatedStorage:WaitForChild("MainModule"):WaitForChild("ChatSettingsRemote")
local ChatSettings = ChatSettingsRemote:InvokeServer()
local ChatService = game:GetService("Chat")
ChatService:RegisterChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, function()
print("Chat Window Settings Saving!")
return ChatSettings.WindowSettings
end)
ChatService:SetBubbleChatSettings(ChatSettings.BubbleChatSettings)
print("Bubble Chat Settings Saved!")
For some reason, it doesn’t print Chat Window Settings Saving!
. After a ton of bad scratching, I can’t figure this out. It’s in ReplicatedFirst, and it’s a LocalScript, but it won’t print. I need it set up with the RemoteFunction because of some backend stuff I’m doing, I can’t do it any other way. Why won’t this work? How do I fix it?
EDIT: I’ve tried this:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatSettings
local ChatService = game:GetService("Chat")
ChatService:RegisterChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, function()
local ChatSettingsRemote = ReplicatedStorage:WaitForChild("MainModule"):WaitForChild("ChatSettingsRemote")
ChatSettings = ChatSettingsRemote:InvokeServer()
print("Chat Window Settings Saving!")
return ChatSettings.WindowSettings
end)
ChatService:SetBubbleChatSettings(ChatSettings.BubbleChatSettings)
print("Bubble Chat Settings Saved!")
And it doesn’t work either. It still doesn’t print Chat Window Settings Saving!
.