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: I'm just starting up and need your guys help.

Previous Thread :: Next Thread 
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
02 Oct 2012 11:42 AM
x = Instance.new("Part")
x.Parent = game.Workspace
Is there something wrong with that because when i put it into a script it doesn't insert a part. Please help!
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
02 Oct 2012 11:47 AM
Looks fine to me...
Try anchoring it, maybe?

-------------------------
~thedestroyer115, nice and helpful posts- sometimes~
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
02 Oct 2012 12:00 PM
Position it.


Position = Vector3.new(0,10,0)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
02 Oct 2012 12:05 PM
^ Yes, that too.
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Oct 2012 12:17 PM
x = Instance.new("Part")
x.Parent = game.Workspace

This insert a part but it may fall, so as thedestroyer115 and Fedorakid said above, anchor it and change it's position:

x = Instance.new("Part")
x.Parent = game.Workspace
x.Position = Vector3.new(0, 10, 0)
x.Anchored = true

By the way, you can remove this line ("x.Parent = game.Workspace") and enter the location ( workspace ) directly in the instance:

x = Instance.new("Part", game.Workspace)

...and the next...:

x.Position = Vector3.new(0, 10, 0)
x.Anchored = true

Report Abuse
technoguyx is not online. technoguyx
Joined: 05 Dec 2008
Total Posts: 8286
02 Oct 2012 12:17 PM
Doing that creates an unanchored part at Position (0, 0, 0). Either of these might be reasons you aren't seeing the part:

local x = Instance.new("Part", workspace)
x.Anchored = true

--one would normally use CFrame, but for the sake of simplicity I'll change the Position directly:
x.Position = Vector3.new(0, 10, 0)

As you can see in the first line, you may also use the second parameter of Instance.new() to set the Parent of the object right after creation. c:
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
02 Oct 2012 12:42 PM
But i can't see it in workspace either.
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Oct 2012 12:54 PM
Do you know how to run a script ? Did you disable and enable the script to execute it ?
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
02 Oct 2012 01:21 PM
Dang, thanks.
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
02 Oct 2012 01:32 PM
I can only find disable, to enable to i click back off it? Because it still hasn't worked when i did that.
Report Abuse
nairod7 is not online. nairod7
Joined: 26 Mar 2010
Total Posts: 869
02 Oct 2012 02:29 PM
Yes. Try this script :

local part = Instance.new("Part", Game.Workspace)
part.Anchored = true
part.Position = Vector3.new(Game.Workspace.boxerboycool.Head.CFrame.p+Vector3.new(0, 10, 0))
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