I've been working on a game and i'm using sockets for some simple backend stuff. One issue i noticed is that when a player dies, i emit a socket requesting to reset the game. the issue is, this gets sent to everyone, so when one person dies, everyone gets sent back to the home screen.
How can i make it so that (io.emit - the server) only affects the (socket.on - the client)?
My heart stopped when i realized this, i've gotten so far and i can't believe this hadn't crossed my mind!