|
What I want to happen is the arm not to move when the tool is equipped. I don't want it anchored, but I want it like stuck at the normal position, but still able to move. I'm not the best with tools, so I bet I have some issues. |
|
|
Here is the script:
function WeldArm()
wait(1)
t = script.Parent.Parent:findFirstChild("Torso")
r = t:findFirstChild("Right Shoulder")
r.MaxVelocity = 5
r.DesiredAngle = 0
end
script.Parent.Equipped:connect(WeldArm) |
|
|
It goes to the spot, but doesn't stay. |
|
|
|
So...
function WeldArm()
while true do
wait(1)
t = script.Parent.Parent:findFirstChild("Torso")
r = t:findFirstChild("Right Shoulder")
r.MaxVelocity = 5
r.DesiredAngle = 0
end
script.Parent.Equipped:connect(WeldArm)
Would this be the while loop? (Like I said, not good with tools.) |
|
|
|
bloob827Join Date: 2010-08-01 Post Count: 6867 |
yOU WOULD NEED ANOTHER END FOR THE FUNCTION.. |
|
|
I know, I forgot to add that, but in the real script I had two and it didn't work. |
|
bloob827Join Date: 2010-08-01 Post Count: 6867 |
lolwut says the cow pig at dawn
function WeldArm()
t = script.Parent.Parent:findFirstChild("Torso")
r = t:findFirstChild("Right Shoulder")
r.MaxVelocity = 5
r.DesiredAngle = 0
end
while true do
wait()
script.Parent.Equipped:connect(WeldArm)
wait()
end
|
|
|
Didn't work..I'm stumped on this... |
|
bloob827Join Date: 2010-08-01 Post Count: 6867 |
i still don't get it why you put in
t=script.Parent.Parent:findFirstChild("Torso")
r=t:findFirstChild("Right Shoulder") |
|
bloob827Join Date: 2010-08-01 Post Count: 6867 |
mayb try dis?
function WeldArm()
t = script.Parent.Parent:findFirstChild("Torso")
r = script.Parent.Parent:findFirstChild("Right Shoulder")
r.MaxVelocity = 5
r.DesiredAngle = 0
end
while true do
wait()
script.Parent.Equipped:connect(WeldArm)
wait()
end
|
|
|
I put in the r = script.Parent.Parent:findFirstChild("Right Shoulder") to find the Right Shoulder and weld it still. |
|
pighead10Join Date: 2009-05-03 Post Count: 10341 |
I don't understand the question. |
|
|
I'm trying to make a script for a tool so the right arm stays where it is instead of going to the position most tools put it in. |
|