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
 

Need some help, GUI stuff

Previous Thread :: Next Thread 
Joseph96gr is not online. Joseph96gr
Joined: 28 Aug 2012
Total Posts: 383
01 Mar 2013 07:42 PM
I made a script that when it is activated, it will spawn a small brick that could be used for a multitude of things. It wasnt very hard to make, and I'm not happy with it just as a script, so I decided i wanted it in a GUI. I know how to make a GUI, but I have no clue as to how to get this script:

Part = Instance.new( "Part")
Part.Parent = workspace
Part.BrickColor = BrickColor.new("Institutional White")
Part.Material = Enum.Material.Plastic
Part.Reflectance = 0
Part.Transparency = 0
Part.Name = "Scripted Part"
Part.Anchored = false
Part.CanCollide = true
Part.Elasticity = 0.5
Part.Friction = 0.30000001192093
Part.Shape = Enum.PartType.Block
Part.formFactor = Enum.FormFactor.Symmetric
Part.Size = Vector3.new(1, 1, 1)
Part.CFrame = CFrame.new()
Part.BackSurface = Enum.SurfaceType.Smooth
Part.BottomSurface = Enum.SurfaceType.Smooth
Part.FrontSurface = Enum.SurfaceType.Smooth
Part.LeftSurface = Enum.SurfaceType.Smooth
Part.RightSurface = Enum.SurfaceType.Smooth
Part.TopSurface = Enum.SurfaceType.Smooth

. into a GUI and work every time I click the button. What I'm planning on doing is tearing apart one of the "Stamper" spin-offs and seeing how that GUI is set up. If you could tell me that would be great, if not, it's ok because I would figure it out eventually, every one does.
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
01 Mar 2013 07:49 PM
script.Parent.MouseButton1Click:connect(function() -- in the button
-- code to create part
end)

http:///wiki.roblox.com/index.php/MouseButton1Click_(Event)
Report Abuse
Joseph96gr is not online. Joseph96gr
Joined: 28 Aug 2012
Total Posts: 383
01 Mar 2013 07:55 PM
so it would look like this?

script.Parent.MouseButton1Click:connect(function()
Part = Instance.new( "Part")
Part.Parent = workspace
Part.BrickColor = BrickColor.new("Institutional White")
Part.Material = Enum.Material.Plastic
Part.Reflectance = 0
Part.Transparency = 0
Part.Name = "Scripted Part"
Part.Anchored = false
Part.CanCollide = true
Part.Elasticity = 0.5
Part.Friction = 0.30000001192093
Part.Shape = Enum.PartType.Block
Part.formFactor = Enum.FormFactor.Symmetric
Part.Size = Vector3.new(1, 1, 1)
Part.CFrame = CFrame.new()
Part.BackSurface = Enum.SurfaceType.Smooth
Part.BottomSurface = Enum.SurfaceType.Smooth
Part.FrontSurface = Enum.SurfaceType.Smooth
Part.LeftSurface = Enum.SurfaceType.Smooth
Part.RightSurface = Enum.SurfaceType.Smooth
Part.TopSurface = Enum.SurfaceType.Smooth
end)
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
01 Mar 2013 07:57 PM
Yup, just make sure that's in a script in either a TextButton, or ImageButton.
Report Abuse
Joseph96gr is not online. Joseph96gr
Joined: 28 Aug 2012
Total Posts: 383
01 Mar 2013 08:28 PM
k, thx, it will be in an image button
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