So My friend made this script for me on replicated storage. Idk how he did it.... The plan is when a player clicks a text button, the gun saves as a string so that way, when the players are spawning, they can choose custom 1-5 (textbuttons) which has the stored guns that they chose. My question is how do I get the gun to save inside the string value so the gun that they chose will spawn with them?
Script:
local Data = game:GetService("DataStoreService"):GetDataStore("DataStore")
local Plr = game.Players.
Data:SetAsync(Plr.userId..'Primary', PrimaryStringValue.Value)
-- Plr.userId..'Primary' is the key, so thats what u save it to
-- and to get it do this
local Primary = Data:GetAsync(Plr.userId..'Primary') or 'None'

1 comment
Wait, for the variable, "Plr", it says game.Players. and is not finished. Add a LocalPlayer to the end and make the script local. (It should because you're using Replicated Storage)