|
| 17 Oct 2016 12:42 AM |
So i want to make a script that will pretty much put a block into a random spot in an area, then i want it to change that block to another type of block for example I wrote this but im not sure how i can make the model that i have already made called "Treesapling" into the game
while true do m = Instance.new ("Model") m.Parent = game.Workspace m.Name = "Sapling" t = Instance.new ("Treesapling")
end
Can anyone help with this? |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2016 01:01 AM |
I've worked on it a bit but it is spawning white blocks? why can't i add in the part i want to put in
while true do local Part = game.workspace.Treesapling local m = Instance.new ("Model") m.Parent = game.Workspace m.Name = "Sapling" local t = Instance.new ("Part") t.Anchored = true t.Position = Vector3.new(math.random(-20,20),0,math.random(-20,20)) t.Parent = m wait (3) end
|
|
|
| Report Abuse |
|
|
Naco88
|
  |
| Joined: 30 Oct 2009 |
| Total Posts: 665 |
|
|
| 17 Oct 2016 05:11 AM |
Do you mean how do you change the brick colour?
Color3.new(r, g, b) |
|
|
| Report Abuse |
|
|
Pheserus
|
  |
| Joined: 07 Aug 2016 |
| Total Posts: 69 |
|
|
| 17 Oct 2016 05:26 AM |
Are you trying to make a new copy of something you already made? In that case you can just clone it.
local ts = game.Workspace.Treesapling; local newTS = ts:Clone(); ts.Parent = model;
|
|
|
| Report Abuse |
|
|
Pheserus
|
  |
| Joined: 07 Aug 2016 |
| Total Posts: 69 |
|
|
| 17 Oct 2016 05:27 AM |
sorry, typo.
newTS.Parent = model |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2016 06:43 AM |
while true do repeat wait() until workspace:findFirstChild("Treesapling")local Part=workspace.Treesapling local m = Instance.new ("Model",workspace)m.Name=("Sapling") local t=Instance.new("Part") t.Anchored = true t.Position=Vector3.new(math.random(-20,20),0,math.random(-20,20))wait[[ ]]t.Parent=m;wait"3";end;
|
|
|
| Report Abuse |
|
|