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: How would I make a local part?

Previous Thread :: Next Thread 
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 05:38 PM
Is it something like v

local function part()
p = Instance.new("Part", game.Workspace.Gamingowl)
wait(1)
end

or something close to that? ^
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Mar 2014 05:40 PM
wrong wrong wrong wrong
use this in a local script:

a=Instance.new("Part")
a.Parent=workspace.CurrentCamera
Report Abuse
ThrashingThunder is not online. ThrashingThunder
Joined: 03 Oct 2011
Total Posts: 2388
06 Mar 2014 05:40 PM
Insert a part into the player's CurrentCamera.
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 05:43 PM
0_0 Wow I was way off. Oh okay. Thanks to you both. ^_^ I needed this for something. I thank you alot for fixing it.
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 05:45 PM
p.s
Localscript should be in startergui
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
06 Mar 2014 05:45 PM
or starterpack
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 05:50 PM
Yeah
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Mar 2014 05:51 PM
you dont need it in one... you could make it so when a button is pressed it is cloned into the players backpack from server storage or something...
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
06 Mar 2014 05:52 PM
@dave inefficiency at its finest.
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:05 PM
@wazap
So true..

plr = game.Players.LocalPlayer
repeat wait() until plr.Character
cc = Workspace.CurrentCamera
cc:ClearAllChildren()--so that we won't have more parts afterwards,not entirely sure if it clears itself..
p = Instance.new("Part",cc)
p.Anchored = true
p.Size=Vector3.new(10,1,15)
p.Name = "Platform"
p.CFrame = plr.Character.Torso.CFrame*CFrame.new(0,0,-20)
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 06:25 PM
Can you tell me why this doesn't work? I have it in the starterpack..

if script.Parent.Parent.TeamColor == "Bright Blue" then
n = Instance.new("Part")
n.Parent = game.Workspace.CurrentCamera
n.Anchored = true
n.Position = Vector3.new(4, 1.2, 1)
n.Size = Vector3.new(12,8,1)

elseif script.Parent.Parent.TeamColor == "Bright orange" then
n = Instance.new("Part")
n.Parent = game.Workspace.CurrentCamera
n.Anchored = true
n.Position = Vector3.new(18, 1.2, 1)
n.Size = Vector3.new(12,8,1)
end
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:27 PM
CurrentCamera can only be accesed from a local script
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 06:28 PM
I have the code in a "localscript" in the "starterpack"...
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:28 PM
Starterpack
-LocalScript
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:29 PM
Oh...
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 06:29 PM
Yeah.... Like that. Do I have to many parents? or to little? or is it something else?
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
06 Mar 2014 06:31 PM
local player = game:GetService("Players").LocalPlayer
repeat wait() until player
if player.TeamColor == BrickColor.new("Bright Blue") then
n = Instance.new("Part")
n.Parent = game.Workspace.CurrentCamera
n.Anchored = true
n.Position = Vector3.new(4, 1.2, 1)
n.Size = Vector3.new(12,8,1)

elseif player.TeamColor == BrickColor.new("Bright orange") then
n = Instance.new("Part")
n.Parent = game.Workspace.CurrentCamera
n.Anchored = true
n.Position = Vector3.new(18, 1.2, 1)
n.Size = Vector3.new(12,8,1)
end
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:31 PM
BrickColor.new("Color")
That's the problem
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Mar 2014 06:31 PM
Noah ninjad me..:/
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
06 Mar 2014 06:32 PM
o and btw, change "Bright Blue" to "Bright blue"
Report Abuse
GamingOwl is not online. GamingOwl
Joined: 18 Feb 2014
Total Posts: 350
06 Mar 2014 06:36 PM
THANK YOU SOOOO MUCH TO ALL WHO HELPED!!!
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