Datastore In Pairs Error?

Hey everyone, it seems im getting an error from this datastore script this is a part of it, and here is the error im getting, if u could help me i would really appreciate it, thank you.
– Error
invalid argument #1 to 'pairs' (table expected, got Instance)

– Script

            local function create_table(plr)
            	local player_stats = {}
            	for _, stat in pairs(plr.PlayerDataFolder.PlayerBasket) do --The error is on this line
            		player_stats[stat.Name] = stat.Value
            	end
            	return player_stats
            end

So pretty much you are trying to use an instance, in order to loop through it’s children. So instances with children have a method called

:GetChildren()

which will return a table of all the children of the instance. So if you revise your code it should look like this…

        local function create_table(plr)
        	local player_stats = {}
        	for _, stat in pairs(plr.PlayerDataFolder.PlayerBasket:GetChildren()) do 
        		player_stats[stat.Name] = stat.Value
        	end
        	return player_stats
        end

Yep that’s true but the problem here is that im trying to target PlayerBasket only not it childrens, should i not use i, v in pairs do at all?