|
| 18 Mar 2013 10:53 PM |
I am making a script where a random number of bricks are made and positioned randomly at an offset of the previously made part. The first part has an offset of an already made brick in workspace. The problem is every brick is positioned in the same place, and the output does not give any hint at why.
Hint = game.Lighting.Hint
while true do wait(5)
Hint:Clone().Parent = Workspace msg = Workspace.Hint msg.Text = "Welcome to climber v1.0. Generating new map..." wait(5) msg.Parent = nil
local x = Instance.new("Part", Workspace) chgsize = math.random(5, 10) x.Size = Vector3.new(chgsize, chgsize, chgsize) startpoint = game.Workspace.Start x.CFrame = startpoint.CFrame + Vector3.new(math.random(5, 10),math.random(5, 10),math.random(5, 10)) x.CFrame = CFrame.Angles(math.rad(1, 360),math.rad(1, 360),math.rad(1, 360)) x.Color = Color3.new(math.random(),math.random(),math.random()) x.Anchored = true partname = 1 x.Name = "Part"..partname
for i = 1, math.random(100, 200) do wait() local x = Instance.new("Part", Workspace) chgsize = math.random(5, 10) x.Size = Vector3.new(chgsize, chgsize, chgsize) findpart = game.Workspace:findFirstChild("Part"..partname) x.CFrame = findpart.CFrame + Vector3.new(math.random(5, 10),math.random(5, 10),math.random(5, 10)) x.CFrame = CFrame.Angles(math.rad(1, 360),math.rad(1, 360),math.rad(1, 360)) x.Color = Color3.new(math.random(),math.random(),math.random()) x.Anchored = true partname = partname + 1 x.Name = "Part"..partname end
end
|
|
|
| Report Abuse |
|
|
| 18 Mar 2013 10:55 PM |
| I have to leave right now to go to bed. I will try to find the issue when I can.. |
|
|
| Report Abuse |
|
zins
|
  |
| Joined: 14 Jan 2011 |
| Total Posts: 3394 |
|
| |
|
| 18 Mar 2013 11:45 PM |
Clone().Parent
still works
~«stealing shopping carts since the 1930's»~ |
|
|
| Report Abuse |
|
| |
| |
| |