Redundant
You are setting the key (plr.UserId) to v.Value every single iteration in the loop. You are overwriting the last entry with the next.
Another problem with this approach is that datastores have a limit on how many requests in a set amount of time. This means that if 10 players leave at once, the game will start to queue the data. This leaves you prone to data loss if the server crashes/etc.
You should save the data as a table. Save the Bandwith!
local data = {} for i, v in pairs(plr.Inventory.Trails:GetChildren()) do table.insert(data, v.Value) end ds:SetAsync(plr.UserId, data)
Hopefully this helps!
EDIT: Just realized someone already suggested this! My apologies. The following is still important:
Also, try not to use SetAsync every time you need to save. Use UpdateAsync() instead to prevent data loss. See this thread.