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 » Scripters
Home Search
 

AI seems broken

Previous Thread :: Next Thread 
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
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
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
12 May 2015 09:44 PM
Well, that's what you told it to do. Try rereading the loop.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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