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: Why doesent this script work?

Previous Thread :: Next Thread 
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 10:42 AM
Part1 = Instance.new("Part",Workspace)
Part1.BrickColor = BrickColor("Bright blue")
Part1.FormFactor = "Custom"
Part1.Anchored = false
Part1.Size = Vector3.new(4.5,4.5,4.5)

weld = Instance.new("Weld",part1)
weld.Part0 = game.Workspace.Kepie.Torso
weld.Part1 = Part1
weld.C0 = CFrame.new(0,0,0)

Its supposed to come a 4.5X4.5X4.5 part in the middle of the torso (Or i will just say torso) so why doesent it work?
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 10:45 AM
Look at this line: weld = Instance.new("Weld",part1)

small p for Part1. Fix this fix then see what happens.
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 10:51 AM
Ops, forgot it was, i will test.
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 10:52 AM
Still doesen't work???
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 11:05 AM
this line needs fixing:

Part1.BrickColor = BrickColor.new("Bright blue")
Report Abuse
0skybax0 is not online. 0skybax0
Joined: 26 Dec 2010
Total Posts: 1049
16 May 2012 11:13 AM
don't use signle = but double ==
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 11:25 AM
no it is single = to set and == if you want to do conditional testing

Part1 is a property of weld. So to call something else Part1 makes it confusing. So I called it brick. Second, the size is way too big, I made it (1,1,1) just to show how it works.

try this:
local brick = Instance.new('Part',Workspace)
brick.BrickColor = BrickColor.new("Bright blue")
brick.FormFactor = "Custom"
brick.Anchored = false
brick.Size = Vector3.new(1,1,1)


local weld = Instance.new('Weld',Workspace)
--the weld is inside the torso
weld.Part0 = game.Workspace.TheEagleGuy.Torso
--the object that the weld will be attached to
weld.Part1 = brick
weld.C0 = CFrame.new(0,0,-1)
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 11:37 AM
Why is it local brick and local weld?
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 11:42 AM
It has to do with variable scope. If you don't declare a variable as local then it becomes global by default. Doesn't actually matter in this script.
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 11:43 AM
But that's a Lua detail not specific to Roblox
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 11:48 AM
So, it doesen't have to be local?
Report Abuse
TheEagleGuy is not online. TheEagleGuy
Joined: 15 Apr 2012
Total Posts: 43
16 May 2012 11:51 AM
It is not required. If this were a function or method it would be good practice.
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 11:52 AM
And, its one failure with the one you gave me eagle, its not CFraming into the torso, it appears in the front of the middle of the torso.
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 11:57 AM
bump
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 01:04 PM
bump
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
16 May 2012 01:33 PM
bawmp
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
17 May 2012 01:10 AM
bump
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 May 2012 01:36 AM
just change the freaking C0 ..
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
17 May 2012 02:33 AM
Kewl gai above.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 May 2012 02:41 AM
gai?
I don't think you can say anything like that to me..
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
17 May 2012 02:43 AM
http://www.roblox.com/My/Groups.aspx?gid=275483 -- check out the highest rank.

It's F3AR Sp33k for "cool guy".
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
17 May 2012 06:32 AM
[ Content Deleted ]
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
17 May 2012 07:17 AM
Why should i change the C0?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
17 May 2012 08:09 AM
so i can eat bananas
No seriously ofc because you dont want it to appear in front of the torso
Report Abuse
Kepie is not online. Kepie
Joined: 12 Nov 2011
Total Posts: 884
17 May 2012 08:15 AM
Ok.
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