|
| 12 May 2015 09:23 PM |
Pretty much all it does is go to the position after jumping over obstacles and hopping out of chairs it just starts jumping at where it was supposed to find a new place to go. Help? Here is the script: local lastx = 0 local lastz = 0 local faults = 0 local lefthip = Instance.new("Motor6D", script.Parent.Torso) lefthip.Name = "Left Hip" lefthip.CurrentAngle = 0 lefthip.DesiredAngle = 0 lefthip.MaxVelocity = 0.1 lefthip.Part0 = script.Parent.Torso lefthip.Part1 = script.Parent:FindFirstChild("Left Leg") lefthip.C1 = CFrame.new(0.5, 2, 0) local righthip = Instance.new("Motor6D", script.Parent.Torso) righthip.Name = "Right Hip" righthip.CurrentAngle = 0 righthip.DesiredAngle = 0 righthip.MaxVelocity = 0.1 righthip.Part0 = script.Parent.Torso righthip.Part1 = script.Parent:FindFirstChild("Right Leg") righthip.C1 = CFrame.new(-0.5, 2, 0) local leftshoulder = Instance.new("Motor6D", script.Parent.Torso) leftshoulder.Name = "Left Shoulder" leftshoulder.CurrentAngle = 0 leftshoulder.DesiredAngle = 0 leftshoulder.MaxVelocity = 0.1 leftshoulder.Part0 = script.Parent.Torso leftshoulder.Part1 = script.Parent:FindFirstChild("Left Arm") leftshoulder.C1 = CFrame.new(1.5, 0, 0) local rightshoulder = Instance.new("Motor6D", script.Parent.Torso) rightshoulder.Name = "Right Shoulder" rightshoulder.CurrentAngle = 0 rightshoulder.DesiredAngle = 0 rightshoulder.MaxVelocity = 0.1 rightshoulder.Part0 = script.Parent.Torso rightshoulder.Part1 = script.Parent:FindFirstChild("Right Arm") rightshoulder.C1 = CFrame.new(-1.5, 0, 0) local neck = Instance.new("Motor6D", script.Parent.Torso) neck.Name = "Neck" neck.CurrentAngle = 0 neck.DesiredAngle = 0 neck.MaxVelocity = 0.1 neck.Part0 = script.Parent.Torso neck.Part1 = script.Parent.Head neck.C1 = CFrame.new(0, -1.5, 0) script.Parent.Humanoid.WalkToPoint = Vector3.new(math.random(-128, 128), 0, math.random(-128, 128)) while true do if script.Parent.Torso.Position.X == script.Parent.Humanoid.WalkToPoint.X then if script.Parent.Torso.Position.Z == script.Parent.Humanoid.WalkToPoint.Z then script.Parent.Humanoid.WalkToPoint = Vector3.new(math.random(-128, 128), 0, math.random(-128, 128)) end end if script.Parent.Torso.Position.X == lastx then if faults >= 10 then faults = 0 script.Parent.Humanoid.Jump = true else faults = faults + 1 end else lastx = script.Parent.Torso.Position.X end if script.Parent.Torso.Position.Z == lastz then if faults >= 10 then faults = 0 script.Parent.Humanoid.Jump = true else faults = faults + 1 end else lastz = script.Parent.Position.Z end wait(0.1) end |
|
|
| Report Abuse |
|
|
| 12 May 2015 09:44 PM |
| Well, that's what you told it to do. Try rereading the loop. |
|
|
| Report Abuse |
|