I have this event that’s fired off hundreds of times a second when a player joins. It basically spawns in individual pieces of trash for them.
self.Client.SpawnTrash:Fire(player)
However, I keep getting
Remote event invocation queue exhausted for ReplicatedStorage.Packages.Knit.Services.TrashService.RE.SpawnTrash; did you forget to implement OnClientEvent? (32 events dropped)
How can I wait till the client has loaded fully first, without putting trust in the client to actually return something?? Be purely server side
You could fire the same event from the client first, and then on server end fire it back. So that the client decides when to ask for the trash to spawn.
Not really viable, as when a single piece of trash is collected, it automatically needs top fire again. Would be a nightmare to have several remotes handle either spawn all trash, spawn specific trash etc. This remote basically gets fired if their trash < a threshold number.
Your error doesn’t have anything to do with client being loaded. It says that you are firing the event too many times. You need to reduce the number of times it fires in a second, or better yet, as suggested above, fire it once and start spawning whatever by firing only once.
And as I mentioned in my reply, I can’t just fire it once. The error is relating to client not being loaded, as when the clients loaded, I can fire a remote off every task.wait() with no issues. It’s only cause the client has loaded and the listener hasn’t loaded that that error occurs