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

How do i create the second value too?

Asked by 5 years ago

i do not get any errors but "red" does not get created, unless i move it above "WhichSelected" but then "WhichSelected" does not get created

01local players = game:GetService("Players")
02local datastore = game:GetService("DataStoreService")
03local ds1 = datastore:GetDataStore("Gs165g61g6sg16G6")
04local ds2 = datastore:GetDataStore("Gsga1hs61sd5j1sj6s1")
05 
06players.PlayerAdded:connect(function(player)
07    local folder = Instance.new("Folder")
08    folder.Name = "Colors"
09    folder.Parent = player
10 
11    local WhichEquipped = Instance.new("StringValue")
12    WhichEquipped.Name = "WhichIsEquipped"
13    WhichEquipped.Parent = player
14    WhichEquipped.Value = ds1:GetAsync(player.UserId) or "Red"
15    ds1:SetAsync(player.UserId, WhichEquipped.Value)
View all 30 lines...

i think something is wrong with these lines

1red.Value = ds2:GetAsync(player.UserId) or false
2    ds2:SetAsync(player.UserId, red.Value)
0
Are there any errors printed to the output? And when you mean "red" does not get created, do you mean the datastore entry or the BoolValue? compUcomp 417 — 5y
0
there are no errors, and i mean the bool value VykaGaming 7 — 5y
1
set red's parent to folder. So line 19 should say red.Parent = folder killerbrenden 1537 — 5y
0
You have to make another int value but you have to make the leaderstats the values parent like: InspireWithFun 9 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

If you want to make 2 int values then you have to make 2 int values like try making 2 int values but set their parent to the leaderstats folder that you created.

Ad

Answer this question