I wrote a script that would work, here it is:
01 | local ServerStorage = game:GetService( "ServerStorage" ) |
05 | local clone 1 = ServerStorage:WaitForChild( "Clone1" ):Clone() |
07 | local part = Instance.new( "Part" , game.Workspace.Blocks) |
09 | part.Size = Vector 3. new( 3 , 3 , 3 ) |
10 | part.Position = Vector 3. new( 0 , 1.5 , 0 ) |
As you can see, the only thing I did was put the clone1
variable inside the while loop and add an end
at the end.
I'm gonna try my best to explain why your code didn't work.
1 | local Clone 1 = game.ServerStorage.Clone 1 :Clone() |
3 | part = Instance.new( "Part" , workspace.Blocks) |
5 | part.Size = Vector 3. new( 3 , 3 , 3 ) |
6 | part.Position = Vector 3. new( 0 , 1.5 , 0 ) |
First, the Clone1
variable doesn't change, it always returns the same object so when you set the parent to the new part, it just moves it, and doesn't create a new object.
We fixed that by moving the variable inside the while loop to clone the script repeatedly which changes the object that it's referencing. Confusing, yes. Sorry, I'm not good at explaining stuff...
Then I don't know if this made any difference but end
closing the loop is there because otherwise, it should throw an error that it expects an end
at the end of the file.
That's all; if you've got any questions you can ask in comments.