Hello! I need to show messages from the server via remote events and display them. But the thing is I don’t want to miss any and so I need to queue them. I found an answer from this post, but I don’t know how to pass arguments through it. Here is the code I am using right now
local function add (plrName,itemOrCash,item,amount,sign)
queue:QueueTask(addQ(plrName,itemOrCash,item,amount,sign))
--this runs instantly
end
game.ReplicatedStorage.BE.Add.Event:Connect(add)
game.ReplicatedStorage.RE.Add.OnClientEvent:Connect(add)
or this
local function add (plrName,itemOrCash,item,amount,sign)
queue:QueueTask(addQ)
--this runs in a queue, but doesn't have arguments so it won't work
end
game.ReplicatedStorage.BE.Add.Event:Connect(add)
game.ReplicatedStorage.RE.Add.OnClientEvent:Connect(add)
But if I add arguments and the parentheses “()”, it will run instantly. If I don’t put the parentheses, as in the example from this post, then it won’t have the arguments. The arguments are necessary for the message. To restate the problem, I’m trying to add arguments to the queued function. If you read this, please help me since I’ve been working on this for a week already. Thank you so much!