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 » Scripting Helpers
Home Search
 

Re: script fixing needed

Previous Thread :: Next Thread 
sroge445 is not online. sroge445
Joined: 02 Jun 2008
Total Posts: 5590
11 Nov 2008 03:41 PM
function terrain()
for i = 1, 500 do
wait(0.1)
local s = Instance.new("Part")
s.Position = Vector3.new(math.random(-100, 100), 1, math.random(-100, 100))
s.Size = Vector3.new(math.random(1, 20), math.random(1, 20), math.random(1, 20))
s.Anchored = true
s.Locked = true
s.Name = "terrain"
end
end

its a terrain generator
and the output says nothing
Report Abuse
InvalidName is not online. InvalidName
Joined: 11 Sep 2008
Total Posts: 465
11 Nov 2008 03:43 PM
s.Parent = game.Workspace
Report Abuse
sroge445 is not online. sroge445
Joined: 02 Jun 2008
Total Posts: 5590
11 Nov 2008 03:44 PM
WOW i cant believe i forgot that thx
Report Abuse
MidNightKiller is not online. MidNightKiller
Joined: 09 Mar 2008
Total Posts: 2773
11 Nov 2008 03:47 PM
it might work, just you need something other that function Terrain()
you need like a while true do to make the terrain appear like:

while true do
wait(300)
Terrain()
end
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
11 Nov 2008 03:49 PM
Or just add Terrain() into the script after you type the function.
Report Abuse
kisamebeast is not online. kisamebeast
Joined: 17 Jan 2008
Total Posts: 3086
11 Nov 2008 03:49 PM
erm try this:

pos1,pos2,po3 = math.random(1,20),math.random(1,20),math.random(1,20)
Length,Width,Height = math.random(-100,100),1,math.random(-100,100)

function terrain()
for i = 1, 500 do
wait(0.1)
local s = Instance.new("Part")
s.Parent = game.Workspace
s.Position = Vector3.new(pos1,pos2,pos3)
s.Size = Vector3.new(Length,Width,Height
s.BrickColor = BrickColor.Random() --Whatever, dunno what color u wanted
s.Anchored = true
s.Locked = true
s.Name = "terrain"
end
end

wait(0.1)
function terrain() -- I think this is right
end


Havent tested yet, dunno
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
11 Nov 2008 03:50 PM
PS your terrain would take 50 seconds to 'load'

Just to let you know... XD

I would use wait(.0001) instead. Then it would take .5 seconds to 'load'
Report Abuse
MidNightKiller is not online. MidNightKiller
Joined: 09 Mar 2008
Total Posts: 2773
11 Nov 2008 03:51 PM
it will make it every .2 seconds, it will be laggy... lol change the time...
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
11 Nov 2008 03:52 PM
function terrain()
for i = 1, 500 do
wait(0.1) --takes 50 seconds XD
local s = Instance.new("Part")
s.Parent = workspace
s.Position = Vector3.new(math.random(-100, 100), 1, math.random(-100, 100))
s.Size = Vector3.new(math.random(1, 20), math.random(1, 20), math.random(1, 20))
s.Anchored = true
s.Locked = true
s.Name = "terrain"
end
end

terrain()


--Note to kisame, Position moves the brick to the nearest point it can be without 'fusing' with other bricks. You are thinking about CFrame.
Report Abuse
kisamebeast is not online. kisamebeast
Joined: 17 Jan 2008
Total Posts: 3086
11 Nov 2008 03:54 PM
Oh rofl XD
Report Abuse
InvalidName is not online. InvalidName
Joined: 11 Sep 2008
Total Posts: 465
11 Nov 2008 03:55 PM
Once he had the script working, I'd remove the wait entirely, or simply have wait(). Theres no need for it to take ages, except maybe so people can 'oooh' as it grows.
Report Abuse
sroge445 is not online. sroge445
Joined: 02 Jun 2008
Total Posts: 5590
11 Nov 2008 04:06 PM
look it works fire i wasnted to make it take 50 secs to see it build and i know i can do terrain() when i need it but i did s.Color = Color3.new(math.random(1, 250)) it just gives me a bunch of red bricks
Report Abuse
soccerpr89 is not online. soccerpr89
Joined: 05 Aug 2008
Total Posts: 6726
11 Nov 2008 04:37 PM
woah!
Report Abuse
Popsicle20 is not online. Popsicle20
Joined: 06 Aug 2008
Total Posts: 20233
11 Nov 2008 04:38 PM
Thx i needed help too
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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