I'm making a global chat system, and I have a remote event to send what the client needs to have on their screen. Here is my chat system. ServerScript:
local chat = game:GetService('DataStoreService'):GetDataStore('GlobalChat')
while wait(1) do
local function Update()
local a = chat:GetAsync(1)
local b = chat:GetAsync(2)
local c = chat:GetAsync(3)
local d = chat:GetAsync(4)
print('Found messages.'..
a..
b..
c..
d)
game:GetService('ReplicatedStorage'):WaitForChild('ChatHandler'):FireAllClients(a, b, c, d)
--Since the line of code couldnt fit the screen, I had to remove the indents for it.
end
local success = false
repeat
local s, m = pcall(Update)
if not s then
warn('Could not get messages due to '..m..'. Trying again.')
end
until success
end
LocalScript:
game:GetService('ReplicatedStorage'):WaitForChild('ChatHandler').OnClientEvent:Connect(function(a, b, c, d)
print([[Client recieved messages.]]..
a..
b..
c..
d)
script.Parent[1].Text = a
script.Parent[2].Text = b
script.Parent[3].Text = c
script.Parent[4].Text = d
end)
The client does not print anything, nor does the server give an error. The server script, however, prints all the messages. Also, if you can, how can I prevent game script timeout?

2 comments
check if u didnt accidently disabled them
Check my edited answer.