generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Scripting Help

Previous Thread :: Next Thread 
RobloxChampion1118 is not online. RobloxChampion1118
Joined: 20 Jan 2015
Total Posts: 16
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
RobloxChampion1118 is not online. RobloxChampion1118
Joined: 20 Jan 2015
Total Posts: 16
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 is not online. 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 is not online. 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 is not online. Pheserus
Joined: 07 Aug 2016
Total Posts: 69
17 Oct 2016 05:27 AM
sorry, typo.

newTS.Parent = model
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image