Title is the question but I will give some example context as to why I might place a script in workspace.
I am designing an NPC system where NPCs attack players. I was thinking I might want to have a script inside each NPC in workspace that is their “brain” and would respond to various signals from the server, but beyond that it would be running it own script (inside the model in workspace).
Now obviously a player can modify this script, but would any changes be replicated to other clients? For example if they command the NPC to stop attacking, or attack another player? Or stop moving, or respawn?
I am just not sure how some behaviors replicate to other clients and some don’t.
if I’m understanding you correctly you’re using a local script as the brain of the NPCs, if so local scripts wont run in workspace since its not a descendant of a players character
Hey thanks for replaying, I dont think I said I would be using a local script in Workspace. I had intended to use a server script there as the brain of the NPC.
NPC is in workspace. NPC has server script inside it as the 'brain". Brain listens to changes in valueObjects, also in the NPC model, that are changed by the server.
My question is still, will players be able to tamper with the behavior of these NPC if I set it up like this?