I have a tool in replicated storage, and when the game starts the tool will be cloned from the replicated storage into the local player’s backpack (If they bought a gamepass.)
The only problem is, the tool doesn’t work because the tool has server scripts inside of it. I can’t store the tool in server storage because then the client can’t access it. I can’t store it in the workspace because then you could physically see it. Where can I store the tool?
The tool needs a server script to play whenever the player actually uses it, but I need a local script to copy it into the player’s backpack from the replicated storage. It’s just server scripts can’t be stored in replicated storage.
The local script successfully copies it into the player’s backpack, but the tool doesn’t work because the server script inside of it can’t be in replicated storage.
Then in the case you need a Server Script that manages giving the tool to the player when they join. What you can do is insert a script in the ServerScriptService and from there you can manually make the tool clone to the players backpack when the player joins.
You should be able to use replicatedstorage in this scenario. If the tool isn’t working after being cloned from replicatedstorage, then it’s a problem with the tool code. Another place you could store it however, is serverstorage, but that’s only if you’re worried about exploiters seeing the tools in replicatedstorage. You would be able to access the serverstorage from the client by firing a remote event to have a server script clone the tool from serverstorage into the desired player’s backpack.