Now I'm terrible with Welds, but I'm pretty sure I have the correct solution.
This is happening multiple times in the script, but let's just take lines 59-63 as an example.
You setting the script's parent last. If you look at line 62, you're trying to access "script.Parent". The problem is, you have not set the parent at that time (You do in Line 63). Basically, you're trying to access its parent that doesn't exist. You need to set the script's parent before you try to access its parent.
You probably already know this, but Instance.new() has another argument. The first one is deciding what you are inserting, the second argument sets its parent. So really you can merge the creation line and parental assigning line into 1 function. Here is the fixed script:
02 | Player = script.Parent.Parent |
03 | mouse = Player:GetMouse() |
04 | run = game:GetService( "RunService" ) |
05 | local Left_Arm = script.Parent:FindFirstChild( "Left Arm" ) |
06 | local Right_Arm = script.Parent:FindFirstChild( "Right Arm" ) |
07 | local Core = script.Parent:FindFirstChild( "Torso" ) |
08 | local Left_Leg = script.Parent:FindFirstChild( "Left Leg" ) |
09 | local Right_Leg = script.Parent:FindFirstChild( "Right Leg" ) |
10 | function onKeyDown(key) |
13 | game:GetService( "Chat" ):Chat(Player.Character.Head, "Focus the mind, reflect upon yourself, and determine the goal." ) |
14 | Left_Arm = Instance.new ( "Part" ) |
15 | Right_Arm = Instance.new( "Part" ) |
16 | Core = Instance.new( "Part" ) |
17 | Left_Leg = Instance.new( "Part" ) |
18 | Right_Leg = Instance.new( "Part" ) |
19 | Left_Arm.BrickColor = BrickColor.new( "White" ) |
20 | Left_Arm.Size = Vector 3. new( 2 , 3 , 2 ) |
21 | Left_Arm.TopSurface = "Smooth" |
22 | Left_Arm.BottomSurface = "Smooth" |
23 | Left_Arm.Transparency = 0.7 |
24 | Left_Arm.CanCollide = false |
25 | Left_Arm.CFrame = Player.Character [ "Left Arm" ] .CFrame *CFrame.new( 0 , 0 , 0 ) |
26 | Left_Arm.Parent = workspace |
27 | Right_Arm.BrickColor = BrickColor.new( "White" ) |
28 | Right_Arm.Size = Vector 3. new( 2 , 3 , 2 ) |
29 | Right_Arm.TopSurface = "Smooth" |
30 | Right_Arm.BottomSurface = "Smooth" |
31 | Right_Arm.Transparency = 0.7 |
32 | Right_Arm.CanCollide = false |
33 | Right_Arm.CFrame = Player.Character [ "Right Arm" ] .CFrame *CFrame.new( 0 , 0 , 0 ) |
34 | Right_Arm.Parent = workspace |
35 | Core.BrickColor = BrickColor.new( "White" ) |
36 | Core.Size = Vector 3. new( 3 , 3 , 2 ) |
37 | Core.TopSurface = "Smooth" |
38 | Core.BottomSurface = "Smooth" |
39 | Core.Transparency = 0.7 |
40 | Core.CanCollide = false |
41 | Core.CFrame = Player.Character [ "Torso" ] .CFrame *CFrame.new( 0 , 0 , 0 ) |
42 | Core.Parent = workspace |
43 | Left_Leg.BrickColor = BrickColor.new ( "White" ) |
44 | Left_Leg.Size = Vector 3. new( 2 , 3 , 2 ) |
45 | Left_Leg.TopSurface = "Smooth" |
46 | Left_Leg.BottomSurface = "Smooth" |
47 | Left_Leg.Transparency = 0.7 |
48 | Left_Leg.CanCollide = false |
49 | Left_Leg.CFrame = Player.Character [ "Left Leg" ] .CFrame *CFrame.new( 0 , 0 , 0 ) |
50 | Left_Leg.Parent = workspace |
51 | Right_Leg.BrickColor = BrickColor.new( "White" ) |
52 | Right_Leg.Size = Vector 3. new( 2 , 3 , 2 ) |
53 | Right_Leg.TopSurface = "Smooth" |
54 | Right_Leg.BottomSurface = "Smooth" |
55 | Right_Leg.Transparency = 0.7 |
56 | Right_Leg.CanCollide = false |
57 | Right_Leg.CFrame = Player.Character [ "Right Leg" ] .CFrame *CFrame.new( 0 , 0 , 0 ) |
58 | Right_Leg.Parent = workspace |
59 | local weld = Instance.new( "Weld" , script.Parent) |
61 | weld.C 0 = Left_Arm.CFrame:inverse() |
62 | weld.Part 1 = script.Parent:FindFirstChild( "Left Arm" ) |
63 | local weld 2 = Instance.new( "Weld" , script.Parent) |
64 | weld 2. Part 0 = Right_Arm |
65 | weld 2. C 0 = Right_Arm.CFrame:inverse() |
66 | weld 2. Part 1 = script.Parent:FindFirstChild( "Right Arm" ) |
67 | local weld 3 = Instance.new( "Weld" , script.Parent) |
69 | weld 3. C 0 = Core.CFrame:inverse() |
70 | weld 3. Part 1 = script.Parent:FindFirstChild( "Torso" ) |
71 | local weld 4 = Instance.new( "Weld" , script.Parent) |
72 | weld 4. Part 0 = Left_Leg |
73 | weld 4. C 0 = Left_Leg.CFrame:inverse() |
74 | weld 4. Part 1 = script.Parent:FindFirstChild( "Left Leg" ) |
75 | local weld 5 = Instance.new( "Weld" , script.Parent) |
76 | weld 5. Part 0 = Right_Leg |
77 | weld 5. C 0 = Right_Leg.CFrame:inverse() |
78 | weld 5. Part 1 = script.Parent:FindFirstChild( "Right Leg" ) |
82 | mouse.KeyDown:connect(onKeyDown) |
Hope I helped. :)