How do I disable server scripts in workspace for only one person?

Hello! I’ve run into an issue with NPC’s. So, I have a server script in each NPC that detects if a player clicks on it, and if they do, it pops up a gui for that player. And for the gui (there is only one), if the player clicks a choice (for example, the NPC says a quest, and at the bottom left you click “okay, I’ll do the quest”, every single other NPC activates whenever you click the button, and not just the single NPC you are speaking with. This is because each NPC detects if you click the button, and there isn’t a way to single out only one NPC to detect if you click the button, so only they respond.

But, that’s just my problem. A fix that would work is if you click on an NPC, it disables all other NPC scripts, but that would interfere with other players because they would be able to click on NPCs.

So my issue is, I want to disable a server script locally. I only want to disable a server script for one single person. Is this possible?

Why would you just disable the scripts? It’s not even a practice that I’d recommend. Can’t you just prevent functions or methods from executing in some way? Also what do you mean by:

Because of how vague idea of the design of the system, use conditionals and functions to their best potential instead. Also use RemoteEvents when necessary.

Have a table(or equivalent) that simply tracks each player using their user identifiers(Player.UserId) as keys, which value is a boolean that asks if the player has done X. Then when X is done, Y is then enabled.

Normally, you would handle the UI displaying on client and have server to process the important details. On a client, each has a table that notes its dependencies between NPCs and each prompt are checking if any dependency is complete. Server might need something to reflect the behavior too.

I wrote it in a server script instead of a client script (the client would’ve been better but much much more difficult because of how many remote events would be needed. Every NPC is different and would require so many remote events because of how many server sided things are required, so I wrote everything in the server script. This worked for a really long time, so I kept on making more and more NPCs, each doing different things with thousands of lines of code. The only reason I need to change the system is because I ran into an issue where only one person could speak with an NPC at a time, and I wanted to fix that. And then I went down a rabbit hole trying to fix the issue. So, I’ve come to the conclusion that it would be too difficult to re-write all the code client sided with remote events because of how much code there is. I also cannot simply use a bool value to detect if you’re speaking to one NPC because I would need to change over 20k+ lines of code, which I am simply too lazy to do. So I’d much rather use the Hacky way of just disabling all other NPC scripts which would solve the issue, but I would need to disable a server script for only one person. Is that possible?

You cannot disable a script for only one person on server. That’s impossible.

Well, that sucks. Equinox is kaput :frowning: