Robase - Firebase (Can't store more than one string)

The issue is that every other input other than the first one just transforms after few seconds to the first one, str.Value not increasing correct and isn’t saved in roblox datastore

game.Players.PlayerAdded:Connect(function(plr)
	local str = Instance.new("IntValue")
	str.Parent = plr
	local DBR = game:GetService("DataStoreService"):GetDataStore("BBC")
	local RBM = require(game:GetService("ReplicatedStorage"):WaitForChild("RobaseService"))
	local RobaseService = RBM.new("DELETED")
	local defaultRobase = RobaseService:GetRobase()
	local success, SGameIds = defaultRobase:GetAsync("GameIds")
	local mkp = game:GetService("MarketplaceService")
	
game.ReplicatedStorage.BAD.OnServerEvent:Connect(function(plr,GameId)
	mkp.PromptProductPurchaseFinished:Connect(function(userId,product,purchased)
		if purchased then 
				str.Value = str.Value+1
				local success, err = pcall(function()
					DBR:SetAsync(plr.UserId,str.Value)
				end)
			defaultRobase:SetAsync("GameId"..plr.UserId.." - "..str.Value,GameId, "PUT")
		end
	end)
end)
end)
1 Like

here’s the new code:
The current struggle rn is the str value that isn’t saved in the Roblox datastore,
Another really urgent problem is that eventually all the data the player sends in the input with the purchase are resetting and updating to their first purchase input.

Photo of the first issue:
image – The str value is not increasing in 1.

Photo of the second issue:

image

1 Like

Manged to solve all of the issues within it, the issue could’ve been some sort of loop that it struggled to pass through within the server side.

1 Like

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