I have a remote event inside replicated storage. Both the local and server scripts reference it properly. I’m making something like an arena queue system, where, after there are two players willing to fight, it will do a bunch of code to teleport them to the arena, give them weapons, etc. Since I want their match wins displayed on a screenGui, I need to communicate with a local script. When the second player joins the queue, the code seems to get stuck at the line where the event is fired, saying:
“Argument 1 missing or nil.”
No real explanation, as this error message is super vague and also can have many reasons. Here’s sort of what my code is like:
SERVER SCRIPT (from where the error is occuring):
local event = game.ReplicatedStorage.Event
--code goes here, eventually we come upon an:
if #players == 2 then
event:FireClient()
--code
end
LOCAL SCRIPT (may also be the culprit):
local event = game.ReplicatedStorage.Event
event.OnClientEvent:Connect(function()
--code
end)
Yes, the if statement is inside a function, and no, it’s not after any infinitely repeating loops. Thank you for reading, please help.