Hello, guys! I am back with a question that I can't find an answer to. Here is the code, inside a ServerScript.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AdminMsgEvent = ReplicatedStorage:WaitForChild("AdminMsgEvent")
local DataStoreService = game:GetService("DataStoreService")
local MessageStore = DataStoreService:GetDataStore("DogeAdminMessage")
local function onAdminMsgFired(player, txt)
MessageStore:SetAsync("DogeKey", txt)
end
AdminMsgEvent.OnServerEvent:Connect(onAdminMsgFired)
local connection
function onMessageUpdate(txt)
local M = Instance.new("Message")
M.Parent = game.Workspace
M.Text = txt
wait(5)
M:Destroy()
end
connection = MessageStore:OnUpdate("DogeKey", onMessageUpdate)
However, when I do this, it only shows the message for the server I am on (yes, I tested with multiple accounts in different servers,) but doesn't show up on any other servers. It then gives this error:
13:53:33 -- Calbacks cannot yield.
When I try to send another message after that, this error shows up:
13:50:19 -- Request was throttled. Try sending fewer requests. Key = DogeKey
When this happens, the DataStore refuses to do anything, and no matter how long I wait (I even waited an hour!) it still says that. Plus, the message doesn't show up on my server, or any other servers at all.
--Thanks in advance to those of you who helped!
