of     1   

computercris12
#59198486Wednesday, December 07, 2011 12:33 AM GMT

I hate cloning because i can never understand it.... I have a script that i wait to clone a brick from Lighting and add +5 to each axis each time from the last clone... Script: 1)g = game.Lighting.Grass 2)s = game.Lighting.Sand 3) 4)local m = Instance.new("Model") 5)m.Parent = game.Workspace 6)m.Name = "Sand" 7) 8)s:Clone() 9)s:Clone().Parent = game.Workspace.Sand 10)s:Clone().Position = Vector3.new(0, 180.8, 0) 11)s:Clone().Anchored = true 12)s:Clone().CanCollide = false 13)while true do 14)s:Clone() 15)s:Clone().Parent = game.Workspace.Sand 16)s:Clone().Position = Vector3.new((s.Position.X+5)(s.Position.Y+5)(s.Position.Z+5)) 17)end Output: 18:30:21 - Workspace.Script:16: attempt to call a number value 18:30:21 - Script "Workspace.Script", Line 16 18:30:21 - stack end
SCARFACIAL
#59199077Wednesday, December 07, 2011 12:42 AM GMT

Every time you call :clone(), it will clone it again. Use variables instead of what you're doing. The issue with your script other than that though is simply that you need to add a comma between the x,y and z values of the Vector3 value. local sand = game.Lighting.Sand local model = Instance.new("Model") model.Parent = game.Workspace model.Name = "Sand" local newSand = s:clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(0, 180.8, 0) newSand.Anchored = true newSand.CanCollide = false local lastSand = newSand while wait() do -- Always use a wait in loops local newSand = lastSand:Clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(lastSand.Position.X + 5, lastSand.Position.Y + 5, lastSand.Position.Z + 5) local lastSand = newSand end "I WILL GIVE YOU BACON." - Deadmau5 ~Scarfacial
computercris12
#59199207Wednesday, December 07, 2011 12:44 AM GMT

Eh, there was a problem with your script Script: local sand = game.Lighting.Sand local model = Instance.new("Model") model.Parent = game.Workspace model.Name = "Sand" local newSand = s:Clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(0, 180.8, 0) newSand.Anchored = true newSand.CanCollide = false local lastSand = newSand while wait() do -- Always use a wait in loops local newSand = lastSand:Clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(lastSand.Position.X + 5, lastSand.Position.Y + 5, lastSand.Position.Z + 5) local lastSand = newSand end Output: 18:43:20 - Workspace.Script:7: attempt to index global 's' (a nil value) 18:43:20 - Script "Workspace.Script", Line 7 18:43:20 - stack end What happened now?
computercris12
#59199284Wednesday, December 07, 2011 12:45 AM GMT

Nevermind fixed it. your were calling sand as s...
SCARFACIAL
#59199475Wednesday, December 07, 2011 12:47 AM GMT

It still won't work because of the line: local lastSand = newSand Should just be lastSand = newSand You get the point though :P "I WILL GIVE YOU BACON." - Deadmau5 ~Scarfacial
computercris12
#59199545Wednesday, December 07, 2011 12:48 AM GMT

Now i have another problem.... :/ I want it to take 4 away from x. So i put blah blah blah.X - 4, blah blah blah.Y + 0, blah blah blah.Z + 0) and it just does it once then makes a tower....., It doesnt go across.
computercris12
#59199596Wednesday, December 07, 2011 12:48 AM GMT

Example: local s = game.Lighting.Sand local model = Instance.new("Model") model.Parent = game.Workspace model.Name = "Sand" local newSand = s:Clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(0, 180.8, 0) newSand.Anchored = true newSand.CanCollide = false local lastSand = newSand while wait() do -- Always use a wait in loops local newSand = lastSand:Clone() newSand.Parent = game.Workspace.Sand newSand.Position = Vector3.new(lastSand.Position.X - 4, lastSand.Position.Y + 0, lastSand.Position.Z + 0) local lastSand = newSand end It does the X - 4 once then makes a tower on the last sand..... What did i do wrong?
computercris12
#59199730Wednesday, December 07, 2011 12:50 AM GMT

It does the X - 4 once then makes a tower on the last sand..... What did i do wrong? It is instead adding 4 to the Y..... What the? I said X - 4, Y + 0 what is it doing?

    of     1