So my shop script gives me an error . I tried to write FindFirstChild()
or WaitForChild()
but it also gave me yield for some reason
My folder is already on server storage somehow i dont know why it is giving me the error

The code that i wrote in the script
function loadbuttontools()
local frame = script.Parent.ObjectFrame.ViewingFrame:FindFirstChildOfClass("ScrollingFrame")
wait(0.01) -- to prevent some bugs
if frame then
local tools2 = ServerS.Tools:FindFirstChild(frame.Name):GetChildren()
local tb = script.Item:Clone()
tb.Parent = frame.Items
tb.ItemName.Text = tools2.Name
tb.Image.Image = tools2.TextureId
end
end