FirebaseService sending data errors

Hi, i’m trying to send data from the Datastore2 to Firebase using the opensource code module. I am getting this error:

Here is my code:

local function coinsUpdated(updatedValue)
		local PlayerCoinData = coinsDataStore:Get()
		cash.Value = coinsDataStore:Get(updatedValue)
		database:SetAsync(plr, HttpService:JSONEncode(PlayerCoinData))
	end
1 Like

If you read the documentation here you’ll see that SetAsync has to be a string.

The reason for the error is likely that it tries to do stringVariable .. YOUR_KEY but it fails since you provided the player instance of a string.

1 Like

So how would I convert it into a string?

Change the player instance to the player’s instance and then .UserId

So i changed it to be player.UserId. I’m still getting the samne error

What is your code?