How do i make sure Infinite yield possible on 'ServerStorage:WaitForChild("DataStore2")' doesn't happen?

So im using DataStore2 and i keep seeing these warnings in the output, how do i prevent them?

local ServerStorage = game:GetService("ServerStorage")
local InventoryTemplate = ServerStorage:WaitForChild("InventoryTemplate")
local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")
local DataStore2 = require(ServerStorage:WaitForChild("DataStore2"))
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")


game.Players.PlayerAdded:Connect(function(player)
	local InventoryStore = DataStore2("Inventory", player)

	local replicatedDataFolder = InventoryTemplate:Clone()
	replicatedDataFolder.Name = 	player.UserId
	replicatedDataFolder.Parent = ReplicatedStorage.ReplicatedData
	
	local Coins = Instance.new("NumberValue")
	Coins.Name = "Coins"
	Coins.Parent = player
	
	local InventoryString = Instance.new("StringValue")
	InventoryString.Parent = replicatedDataFolder
	InventoryString.Name = "Inventory"
	
	local InventoryData = InventoryStore:Get({})
	InventoryString.Value = HttpService:JSONEncode(InventoryData)
	
	InventoryStore:OnUpdate(function(decodedData)
		InventoryString.Value =  HttpService:JSONEncode(decodedData)
	end)
end)

game.Players.PlayerRemoving:Connect(function(player)
	local replicatedData = ReplicatedStorage.ReplicatedData:FindFirstChild(player.UserId)
	
	if (replicatedData) then
		replicatedData:Destroy()
	end
end)

Make sure you named it correctly.

Can you send me the image of the explorer?

Yeah sure here

check the explorer during playtesting

like in client or server?

The place where your script belongs. So, if it’s on the client check there.

Its a local script in starterplayerscripts

The client can’t see serverstorage

You’re running this code from a LocalScript… trying to access the server storage?

Oh nvm i fixed the problem