first off what is v?..
also, v.Parent (if v is an instance) returns an Instance, not a string so it’s going to error because you’re trying to set .Text to an Instance.
tostring() takes a set of numbers and turns it into a string
for example 123 turns into “123” if you use tostring()
for _,v in pairs(game:GetDescendants()) do
local success, isScript = pcall(function()
return v:IsA("BaseScript")
end)
if success and isScript then
wait(0.1)
print(v)
local template = newTemplate:Clone()
template.Name = tostring(v)
template.scriptNameType.Text = tostring(v)
-- template.scriptLocation.Text = v.Parent
template.Parent = ScrollingFrame
end
end