I’m currently scripting a weapon that is welded to my character’s right hand when it spawns, I’m not using a tool here. I want it to be so that when my character drops to the baseplate, it has a weapon welded to its right hand but I’m not sure where to store it before clonining, if I should even clone the item. Should I put in the replicated storage, server storage? etc
I’d say ServerStorage for security reasons, assuming you’re using a server script to clone the tool. Objects in ReplicatedStorage can be accessed by the client whereas objects in ServerStorage cannot.
Will the objects in serverstorage be replicated to the server? If it does then what else makes it different from the replicated storage apart from accessibility by client?
Yeah, hence “Server” in the name. There isn’t any difference other than that one can be accessed by the client and the other cannot.
In that case, why are remote events usually placed in the replicated storage when they can be accessed and potentially manipulated by the client?
Putting it anywhere for security reason is the same thing, if its cloned to the character exploiters can still read any local/module scripts.( Not to mention the model itself can be copied via several map copying scripts anyways) The remote functions and events are usually put there since they are can found on both the client and the server.
And no, changes made in the client in ReplicatedStorage are not replicated to the server.
Those are placed there, cause its a connection between client and server. Remotes takes data from client or server and sends it to client or sever.
Place important items in ServerStorage, only able to being reached by a Server Script, maybe using remotes to trigger that, but checking if the client trigger its trustable before letting the Server to access SeverStorage and give the item to player
So when I need the item in the serverstorage, do I clone it or use that very same copy?
Clone it from ServerStorage, the Item in the ServerStorage is ur main item to clone and give to others
Just be sure, if this is triggered by the client, that the client met the requirements to get that Item, on Server Side you can check and reject any suspicious thing that client is trying to trigger