Here’s how you can give a player a default weapon with datastore2:
local datastore2 = require(path_ToModule);
local players = game:GetService("Players");
local function playerAdded(player)
local playerData = datastore2("keyname", player);
-- You can get a default table if you want to save, too.
local defaultWeapon = playerData:Get(yourTool) -- This is will return the "yourTool" if there's no data saved in playerData.
--Here's how you get a default table;
local default = playerData:Get({"Burger", "Pizza"}); -- This will return the table in the parameter if there's nothing saved in the datastore.
end
players.PlayerAdded:Connect(playerAdded)
-- Here's how you can save in datastore;
playerData:Set(); -- You can save anything you want. (Correct me if I am wrong, you cannot save instances.)