Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I solve this replicated storage problem?

Asked by
smd345 0
9 years ago

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'
0
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) EzraNehemiah_TF2 3552 — 9y

Answer this question