The title says it. Where should i keep a local script that checks if the user playing is an admin
If you’re asking this out of a concern for security, the answer is don’t put it in a LocalScript. Instead you should use a Script parented to ServerScriptService so the Script isn’t replicated to any client and the code runs on the server.
Thanks, I will try that. But why use script and not a local script
Scripts
run on the Server. LocalScripts
run on the client. If you do logic like checking if a player is an admin on the client, then an exploiter can fake being an admin, whether that be tricking your script, or writing an entirely new one and injecting it. Exploiters cannot touch Scripts
, so any logic done on them is secure, assuming the data you’re using for that logic is also secure.
what if i place in server script service
LocalScripts
will not run in ServerScriptService.
oh ok thanks for the information