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: Not sure if this is a script or not.

Previous Thread :: Next Thread 
mrsupersonic000 is not online. mrsupersonic000
Joined: 09 Mar 2012
Total Posts: 123
12 Sep 2013 04:46 PM
Okay, so this is a studio script/brick spawn.



Instance.new("Brick", Workspace) Cframe (4, 1, 2)



If this wont work, or something stupid happens, then don't worry. I'm still learning to script, and I got the resizing thing from Builders Test Server.
Report Abuse
Xeptix is not online. Xeptix
Joined: 14 Mar 2013
Total Posts: 1115
12 Sep 2013 04:48 PM
You have a lot to learn...
Instance.new("Brick", Workspace) Cframe (4, 1, 2)

You mean

Instance.new("Brick", Workspace).CFrame(4, 1, 2)

When accessing a property (in this case CFrame*), you need to do object.property, not object property.
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
12 Sep 2013 04:48 PM
Instance.new("Part", Workspace).CFrame =CFrame.new(4,1,2)
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
12 Sep 2013 04:49 PM
properties are not functions and 'Brick' is not a class
Report Abuse
ProfitMargin is not online. ProfitMargin
Joined: 01 Aug 2013
Total Posts: 285
12 Sep 2013 04:49 PM
CFrame is for position
Vector3 is for size and position

Instance.new("Part", game.Workspace).Position = Vector3.new(4,1,2)
Report Abuse
Xeptix is not online. Xeptix
Joined: 14 Mar 2013
Total Posts: 1115
12 Sep 2013 04:49 PM
Also, you're not assigning it correctly.
You're doing object.CFrame(cords) when you need to do object.CFrame = CFrame.new(cords)
Report Abuse
ProfitMargin is not online. ProfitMargin
Joined: 01 Aug 2013
Total Posts: 285
12 Sep 2013 04:49 PM
Instance.new("Part", game.Workspace).Size = Vector3.new(4,1,2)

sorry lol
Report Abuse
ProfitMargin is not online. ProfitMargin
Joined: 01 Aug 2013
Total Posts: 285
12 Sep 2013 04:50 PM
Actually make sure that the formfactor is custom or symmetric

InstanceVar = Instance.new("Part", game.Workspace)
InstnaceVar.FormFactor = "Custom"
InstanceVar.Size = (4,1,2)
Report Abuse
Xeptix is not online. Xeptix
Joined: 14 Mar 2013
Total Posts: 1115
12 Sep 2013 04:51 PM
And I also just realized that you said Brick instead of Part...
Report Abuse
ProfitMargin is not online. ProfitMargin
Joined: 01 Aug 2013
Total Posts: 285
12 Sep 2013 04:52 PM
Dang it I'm making so many mistakes.
InstanceVar = Instance.new("Part", game.Workspace)
InstnaceVar.FormFactor = "Custom"
InstanceVar.Size = Vector3.new(4,1,2)
Report Abuse
laughablehaha is not online. laughablehaha
Joined: 19 Apr 2012
Total Posts: 2495
12 Sep 2013 06:20 PM
p = Instance.new("Part", game.Workspace)
p.Parent = game.Workspace -- Won't spawn without parent
p.FormFactor = Enum.Symmetric -- Enum something... Hmmmmmm
p.Size = Vector3.new(4,1,2)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
12 Sep 2013 06:21 PM
Notice that Instance.new takes the optional second argument as a parent.
And you don't need enums
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