I'm making a randomly generated map that places nodes randomly throughout the map that will place down trees but it will not work for some odd reason the tree moves to the workspace but then the position doesn't change i've tried using :MoveTo and TranslateBy and both didn't work
http://www.roblox.com/Generation-System-place?id=192403853
heres the game its uncopylocked so you can see the code
node placing script
while wait(0.15) do if game.Workspace.Nodes.Value < 75 then script.Choose.Value = math.random(1, 2) if script.Choose.Value == 1 then local test = game.Lighting.Spawn:Clone() test.Parent = game.Workspace game.Workspace.Nodes.Value = game.Workspace.Nodes.Value +1 test.Position = Vector3.new(math.random(1, 148),-8.5, math.random(-148, -1)) else local test2 = game.Lighting.Spawn2:Clone() game.Workspace.Nodes.Value = game.Workspace.Nodes.Value +1 test2.Parent = game.Workspace test2.Position = Vector3.new(math.random(1, 148),-8.5, math.random(-148, -1)) end else end end
script that spawns the tree
local Spawn2 = script.Parent local tree = game.Lighting.Tree:Clone() wait(1) tree.Parent = game.Workspace wait(1) tree:TranslateBy(Vector3.new(script.Parent.Position))
if anyone could please help me figure this out that'd be great
change
tree:TranslateBy(Vector3.new(script.Parent.Position))
to
tree:MoveTo(script.Parent.Position)