Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 22 Jan 2013 02:53 PM |
So, I looked over the original crouch script, went 'that's too inefficient', and made my own code. The legs function perfectly, but the character 'floats' in mid air. I can't figure out what's the problem.
NOTICE: The code is part of more code, so don't go '*facepalm* *writes out KeyDown code*'
if not debounce then print(player.Name .. " is crouching.") debounce = true character.Torso:FindFirstChild("Right Hip").Part1 = nil; character.Torso:FindFirstChild("Left Hip").Part1 = nil cweld = Instance.new("Weld", character.Torso); cweld2 = Instance.new("Weld", character.Torso) cweld.Part0 = cweld.Parent; cweld2.Part0 = cweld.Parent cweld.Part1 = character:FindFirstChild("Right Leg"); cweld2.Part1 = character:FindFirstChild("Left Leg") cweld.C0 = CFrame.new(1.5, -0.5, 0.5)*CFrame.Angles(math.rad(10), 0, 1); cweld2.C0 = CFrame.new(-1.5, -0.5, 0.5)*CFrame.Angles(math.rad(10), 0, -1) elseif debounce then print(player.Name .. " has stopped crouching.") debounce = false cweld:Destroy(); cweld2:Destroy() character.Torso:FindFirstChild("Right Hip").Part1 = character:FindFirstChild("Right Leg"); character.Torso:FindFirstChild("Left Hip").Part1 = character:FindFirstChild("Left Leg") end
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
| |
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 22 Jan 2013 02:59 PM |
@crouton04
Tested-- it just made the legs go to completely different locations. Thanks, though.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 22 Jan 2013 03:05 PM |
| Wait didn't read script are u using crame.angles |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 22 Jan 2013 03:07 PM |
@crouton04
I am using CFrame.Angles.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 22 Jan 2013 05:13 PM |
Bump.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
| |
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 22 Jan 2013 08:31 PM |
Bump.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 24 Jan 2013 06:37 PM |
Bump.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2013 06:54 PM |
| I had the same problem a-while back, my friend DoogleFox said put body force, or one of the body objects, sorry I am not much help, but one of them, I forget which, and make the force, or velocity, whichever, pointing down. and it will work. :D |
|
|
| Report Abuse |
|
|
Xzerizon
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 2174 |
|
|
| 30 Jan 2013 12:22 PM |
Finally solved it.
Just changing the names of the legs will make it function.
Ғľ○ωε⌐'ζ бâŋε ▬ Xζε⌐¡ζ○╖ |
|
|
| Report Abuse |
|
|