"Can't parse JSON" error (my JSON is valid btw)

I want to make a player data StringValue with the .Value formatted with JSON

This LocalScript in StarterPlayerScripts throws error “Can’t parse JSON”:

local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local LocalPlayer = Players.LocalPlayer

wait(5)

local playerDataFolder = ReplicatedStorage:WaitForChild("PlayerData")
local coinDisplay = LocalPlayer.PlayerGui:WaitForChild("Main"):WaitForChild("CoinDisplay")

while true do
	local playerData = playerDataFolder:FindFirstChild("Data_"..tostring(LocalPlayer.UserId))
	local decodedData = HttpService:JSONDecode(playerData)
	coinDisplay.TextLabel.Text = tostring(decodedData.Coins)
	wait(0.1)
end

And the JSON is {"Coins":50,"Level":0,"Wins":0,"XpAmount":0} (100% VALID JSON)

I have tried looking this from Roblox Developer Hub.

It looks like you are passing an Instance into the JSONDecode method. Is playerData supposed to be a StringValue? If so then try changing the line to:

local decodedData = HttpService:JSONDecode(playerData.Value)

When you get this working it may also be a good idea to add a check to ensure that :FindFirstChild did not return a nil value.

Oops, I though I had .Value at the end of line 13 but it was another script I was looking at.

Really stupid mistake.