|
| 24 Nov 2012 10:56 PM |
My goal is to make a crouching position in which the player's legs move. Daxter33 has done this in his paintball game, but when I try to do this my player floats approximately 0.5 to 1 stud above the ground. Can anyone explain this?
for i=1,5 do wait() Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0*CFrame.Angles(0,0,math.rad(3)) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0*CFrame.Angles(0,0,math.rad(-3)) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0+Vector3.new(0,.15,-.1) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0+Vector3.new(0,.15,-.1) end |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 10:57 PM |
Name the legs something different.
Want a script? Send me a PM and we'll work out a deal! |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 10:58 PM |
| Uhh.... That obviously wouldn't work because it'd break the hip motor. |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 11:00 PM |
Then change the Part1.
Want a script? Send me a PM and we'll work out a deal! |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 11:00 PM |
I made a crouch, and better yet use welds, copy the motors and then place them back when finished.
Want a script? Send me a PM and we'll work out a deal! |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 11:20 PM |
I want the legs to move though :3
|
|
|
| Report Abuse |
|
|
|
| 24 Nov 2012 11:48 PM |
Oi...
Want a script? Send me a PM and we'll work out a deal! |
|
|
| Report Abuse |
|
|
salsa232
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 1399 |
|
|
| 24 Nov 2012 11:50 PM |
| Reverse the hep motors left where right and right where left try it |
|
|
| Report Abuse |
|
|
Octopus
|
  |
| Joined: 26 Feb 2008 |
| Total Posts: 460 |
|
|
| 25 Nov 2012 01:15 AM |
| I am literally, at this very second, doing to same thing. I made a crouch but my character is floating. I want it to work without changing the Humanoid's .LeftLeg and .RightLeg |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2012 01:24 AM |
| Use the C1, not he C0 of the motor. |
|
|
| Report Abuse |
|
|
Octopus
|
  |
| Joined: 26 Feb 2008 |
| Total Posts: 460 |
|
|
| 25 Nov 2012 01:27 AM |
| Whether you use the C0 or C1, you still float. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2012 01:29 AM |
| Strange. I've always used the C1 of a joint for any type of animations, and I've never had the issue. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2012 01:29 AM |
| That didn't change anything. My legs still move up when my body should move down. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Nov 2012 01:30 AM |
| Try changing both the C0 and C1 then. See if that works. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Nov 2012 02:32 AM |
Ok so now I have the opposite problem. It's now acting as if I have no legs so my torso touches the baseplate.
Here's my code, maybe you can get something out of it:
if Character:FindFirstChild("Left Leg") then Character["Left Leg"].Name = "LeftLeg" Character["Right Leg"].Name = "RightLeg" Character.LeftLeg.CanCollide = true Character.RightLeg.CanCollide = true end
for i=1,5 do wait(1/30) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0*CFrame.Angles(0,0,math.rad(3)) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0*CFrame.Angles(0,0,math.rad(-3)) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0+Vector3.new(0,.15,-.1) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0+Vector3.new(0,.15,-.1) end |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2012 02:37 AM |
Got it! Really ugly method to do it, but it works.
if Character:FindFirstChild("Left Leg") then fake = Instance.new("Part", Character) fake.Size = Vector3.new(1,1,1) weld = Instance.new("Weld", Character.Torso) weld.Part0 = Character.Torso weld.Parent = Character.Torso weld.Part1 = fake weld.C0 = CFrame.new(0,0,0) fake.Name = "Left Leg"
Character["Left Leg"].Name = "LeftLeg" Character["Right Leg"].Name = "RightLeg" Character.LeftLeg.CanCollide = true Character.RightLeg.CanCollide = true end
for i=1,5 do wait(1/30) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0*CFrame.Angles(0,0,math.rad(3)) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0*CFrame.Angles(0,0,math.rad(-3)) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0+Vector3.new(0,.15,-.1) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0+Vector3.new(0,.15,-.1) end |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2012 02:43 AM |
One more post. Here's the final function
Crouch = function(bool) if bool == true then fake = Instance.new("Part", Character) fake.Size = Vector3.new(1,1,1) weld = Instance.new("Weld", Character.Torso) weld.Part0 = Character.Torso weld.Parent = Character.Torso weld.Part1 = fake weld.C0 = CFrame.new(0,0,0) fake.Name = "Left Leg"
Character["Left Leg"].Name = "LeftLeg" Character["Right Leg"].Name = "RightLeg" --Character.LeftLeg.CanCollide = true --Character.RightLeg.CanCollide = true
for i=1,5 do wait(1/30) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0*CFrame.Angles(0,0,math.rad(3)) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0*CFrame.Angles(0,0,math.rad(-3)) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0+Vector3.new(0,.15,-.1) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0+Vector3.new(0,.15,-.1) end else if Character:FindFirstChild("Left Leg") and Character:FindFirstChild("LeftLeg") then Character["Left Leg"]:Destroy() Character.LeftLeg.Name = "Left Leg" Character.RightLeg.Name = "Right Leg" end for i=1,5 do wait(1/30) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0*CFrame.Angles(0,0,math.rad(-3)) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0*CFrame.Angles(0,0,math.rad(3)) Character.Torso["Left Hip"].C0=Character.Torso["Left Hip"].C0+Vector3.new(0,-0.15,0.1) Character.Torso["Right Hip"].C0=Character.Torso["Right Hip"].C0+Vector3.new(0,-0.15,0.1) end end end |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 25 Nov 2012 05:22 AM |
| Its simple, the legs of a robot decide how high the torso will float(doesnt matter where the legs are) my solution is that you should resize your legs to 1,1,1 so the torso will move down. (Also when you resize it reconnent the motors of the legs again). You could also make a second torso which is welded to the original torso and is welded1 stud lower then the original? |
|
|
| Report Abuse |
|
|