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: Welding Troubles

Previous Thread :: Next Thread 
blocker192 is not online. blocker192
Joined: 13 Jan 2010
Total Posts: 496
04 Aug 2013 03:45 PM
I converted a weld script to work inside of the character as opposed to the tool. Even though I changed almost nothing, the arm just falls off for some reason. The problem is that when it sets

Here's the script:


wait(1)
arms = {sp:FindFirstChild("Left Arm"), sp.Parent:FindFirstChild("Right Arm")}
torso = sp:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[2].Part1 = nil
local weld2 = Instance.new("Weld") -- right arm
weld2.Name = "Weld2"
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-0.75, 1, 0.45) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)--Useless Anyways
welds[2] = weld2
end
else
print("sh")
end
else
print("arms")
end
w2 = script.Parent.Torso.Weld2



Nothing stands out to me that shows a problem, but when I looked at Weld2's Part1 in the explorer, it showed that Part1 was empty. How to fix this?
Report Abuse
WillScriptForFood is not online. WillScriptForFood
Joined: 03 Aug 2013
Total Posts: 701
04 Aug 2013 04:18 PM
Line two.
The left arm tries to find the child in sp, while the right arm in sp.Parent.
Report Abuse
blocker192 is not online. blocker192
Joined: 13 Jan 2010
Total Posts: 496
04 Aug 2013 04:19 PM
I literally JUST FIGURED that out. Can't believe I was so stupid.
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