My Script keeps assigning some generated "Log Mode" Value (?)

What do I want to achieve?

I want to make new players has a default value that I assigned, although the outcome usually Log Value (for ex: 08DC3B4914F2A402.000000000B.08DC3B4FA0875A12.01). I’m expecting it like “BasesSword”
image

local DataService = game:GetService("DataStoreService")
local players = game:GetService("Players")

-- List of DataStore that can be used
local DataList = {
	AllInOneStore = DataService:GetDataStore("AllInOne"),
	Wins = DataService:GetDataStore("AllInOne_Win"),
	Eliminate = DataService:GetDataStore("AllInOne_Eliminate"),
	Coin = DataService:GetDataStore("AllInOneStore_Coin"),
	AB1 = DataService:GetDataStore("AllInOneStore_AB1"),
	AB2 = DataService:GetDataStore("AllInOneStore_AB2"),
	Weapon = DataService:GetDataStore("AllInOneStore_Weapon")
}

local StartAmount = 0

-- Player Join the Game
players.PlayerAdded:Connect(function(plr)
	local leaderstats = Instance.new("Folder", plr)
	leaderstats.Name = "leaderstats"

	local Wins = Instance.new("IntValue", leaderstats)
	Wins.Name = "Wins"
	Wins.Value = DataList.Wins:GetAsync(plr.UserId) or StartAmount -- HERE
	DataList.Wins:SetAsync(plr.UserId, Wins.Value)

	local Eliminate = Instance.new("IntValue", leaderstats)
	Eliminate.Name = "Eliminations"
	Eliminate.Value = DataList.Eliminate:GetAsync(plr.UserId) or StartAmount -- Here
	DataList.Eliminate:SetAsync(plr.UserId, Eliminate.Value)

	-- Data Clients
	local DataClient = Instance.new("Folder", plr)
	DataClient.Name = "DataClient"

	local Coins = Instance.new("IntValue", DataClient)
	Coins.Name = "Coins"
	Coins.Value = DataList.Coin:GetAsync(plr.UserId) or StartAmount -- HERE
	DataList.Coin:SetAsync(plr.UserId, Coins.Value)

	local AB1 = Instance.new("StringValue", DataClient)
	AB1.Name = "Abilities 1"
	AB1.Value = DataList.AB1:GetAsync(plr.UserId) or "None" -- HERE
	DataList.AB1:SetAsync(plr.UserId, AB1.Value)

	local AB2 = Instance.new("StringValue", DataClient)
	AB2.Name = "Abilities 2"
	AB2.Value = DataList.AB2:SetAsync(plr.UserId, AB2.Value) or "None" -- HERE
	DataList.AB2:SetAsync(plr.UserId, AB2.Value)

	local Weapon = Instance.new("StringValue", DataClient)
	Weapon.Name = "Weapon"
	Weapon.Value = DataList.Weapon:SetAsync(plr.UserId, Weapon.Value) or "BaseSword" -- HERE

What’s makes this issues occurs?
Thanks in Advances,

What is the code when the data is set?

Those should be GetAsync.

1 Like

Ah, I didn’t noticed that I stopped using GetAsync the whole time from AB2 :moyai:. Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.