Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Model-To-Script generator gives no output. Why?

print([[
local model = Instance.new("Model",game.Workspace)
]])
local toconvert = game.Workspace["Observation Tower"]
local childrentable={}
local childrennumber=0
sentchildrentable=false
function mainloop(children)
for i=1,#children,1 do
	childrennumber=childrennumber+1
	wait()
	if i==#children then
	for i=1,#childrentable,1 do
		if sentchildrentable==false then
		wait(0.1)
	mainloop(childrentable[i]:GetChildren())
	sentchildrentable=true
	else
	if children[i]:IsA("Model")==false and children[i]:IsA("Folder")==false then
	print("local child"..childrennumber.."=Instance.new("..children[i].ClassName..",model)")
	else
	table.insert(childrentable,children[i])
end
end
end
end
end
end
local toconvertchildren = game.Workspace["Observation Tower"]:GetChildren()
mainloop(toconvertchildren,0)

It gives NO Output. doesn't error, doesn't print.

4 comments

0

Format and I will consider answering

0

Or you could just answer it, instead of demanding that i format it to fit your needs. I can read that script easily.

0

If you expect help, you have to make your code readable. It is hardly readable.

0

Could you please elaborate on what you are trying to achieve at least?

1 answer

The reason it is not printing is because you have the function in Print. So If you wanted to do it. Simply just get the model and put the name as the script. If you wanted to print it which was your question which was not stated. Just upvote this, and Ill get back to you as soon as I can

1 comment

0

The function isn't in print.

This discussion is preserved as it was. New answers, comments, and votes are closed.