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: Tycoon Dispenser

Previous Thread :: Next Thread 
jcpd910 is not online. jcpd910
Joined: 18 Jul 2011
Total Posts: 70
24 Jan 2014 03:53 PM
Hello, I'd like to know how to change what brick my tycoon drops out. Here's my script for the dropper:
function fire()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "TycoonBrick"
p.Parent = script.Parent
end


while true do
wait(2)
fire()
end
Report Abuse
Proofessionally is not online. Proofessionally
Joined: 06 Feb 2012
Total Posts: 443
24 Jan 2014 04:17 PM
p.BrickColor = BrickColor.random()
Thats what you use.
So it is:
function fire()
local p = Instance.new("Part")
p.Position = stript.Parent.Position
p.Size = Vector3.new(0.1,1,1)
p.BrickColor = BrickColor.random()
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "TycoonBrick"
p.Parent = stript.Parent
end




while true do
wait(2)
fire()
end
Report Abuse
Proofessionally is not online. Proofessionally
Joined: 06 Feb 2012
Total Posts: 443
24 Jan 2014 04:25 PM
are you looking for different colors? then thats it.
But that would be kind of not easy if you wanted different shapes:

function fire11()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 1
p.TopSurface = 1
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
function fire12()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 1
p.TopSurface = 2
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
function fire13()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 1
p.TopSurface = 3
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
function fire00()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 0
p.TopSurface = 0
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
function fire01()
local p = Instance.new("Part")
p.Position = script.Parent.Position
-- p.Size = Vector3.new( 0.1 , 1 , 1 )
-- p.BrickColor = BrickColor.new(26)
p.BottomSurface = 0
p.TopSurface = 1
p.Name = "TycoonBrick"
p.Parent = script.Parent
end
while true do
wait(2)
fire11()
wait(2)
fire12()
wait(2)
fire13()
wait(2)
fire00()
wait(2)
fire01()
Change bottom and topsurface for other shapes :D
Report Abuse
Proofessionally is not online. Proofessionally
Joined: 06 Feb 2012
Total Posts: 443
24 Jan 2014 04:28 PM
There is 12 shapes that can be made with these combinations:
0, 0
0, 1
0, 2
0, 3
1, 0
1, 1
1, 2
1, 3
2, 0
2, 1
2, 2
2, 3
3, 0
3, 1
3, 2
3, 3
Report Abuse
Proofessionally is not online. Proofessionally
Joined: 06 Feb 2012
Total Posts: 443
24 Jan 2014 04:29 PM
Woops counted wrong.. 16 lol
Report Abuse
jcpd910 is not online. jcpd910
Joined: 18 Jul 2011
Total Posts: 70
24 Jan 2014 05:24 PM
Actually, I was hoping it would dispense a block that I'd already created. It needs to fire a dollar bill.
Report Abuse
Proofessionally is not online. Proofessionally
Joined: 06 Feb 2012
Total Posts: 443
31 Jan 2014 06:18 AM
You'll need to clone the dollar bill to the coords of the dropper :P
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