of     1   

Thegameboy
#62737014Sunday, February 12, 2012 3:20 AM GMT

I have this one SFing AI, and he has three basic moves: Spinning, running towards someone, or just following them and hurting them. Okay, so, the problem is, is that whenever he spins, he spins but then he just stands in the position he's in and doesn't move at all. The only time he moves is when he spins again. So here's the technique script: (And don't mind all of the values it reffers to, those probably don't matter) while true do wait(0.1) while script.Parent.Parent.IsFollowing.Value == 1 do print("Loaded moves...") wait(0.5) local move = (math.random(1, 3)) if script.Parent.Parent.IsFollowing.Value == 1 then if move == 2 then print("Spinning...") script.Parent.Parent.Spinning.Value = 1 script.Parent.Parent.Sword.Slashing.Value = 1 h = script.Parent.Parent.Humanoid h:MoveTo(Vector3.new(script.Parent.Parent.Torso.Position.x-1), script.Parent.Parent.Torso) wait(0.1) h:MoveTo(Vector3.new(script.Parent.Parent.Torso.Position.x-1), script.Parent.Parent.Torso) wait(0.1) h:MoveTo(Vector3.new(script.Parent.Parent.Torso.Position.z-1), script.Parent.Parent.Torso) wait(0.1) h:MoveTo(Vector3.new(script.Parent.Parent.Torso.Position.z-1), script.Parent.Parent.Torso) wait(0.1) h:MoveTo(Vector3.new(script.Parent.Parent.Torso.Position.x, script.Parent.Parent.Torso.Position.y, script.Parent.Parent.Torso.Position.z), script.Parent.Parent.Torso) script.Parent.Parent.Sword.Slashing.Value = 0 script.Parent.Parent.Spinning.Value = 0 if script.Parent.Parent.Humanoid.Health < 1 then print("Robot died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "OOF!" end if script.Parent.Parent.PlayerDeadValue.Value == 1 then print("Player died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "Nice job, but I got you." end move = (math.random(1, 3)) end end print("Lunging...") if script.Parent.Parent.IsFollowing.Value == 1 then if move == 3 then script.Parent.Parent.Name = "YAAAA!" script.Parent.Parent.Humanoid.WalkSpeed = 32 script.Parent.Parent.Sword.Lunging.Value = 1 wait(1.5) script.Parent.Parent.Sword.Lunging.Value = 0 script.Parent.Parent.Humanoid.WalkSpeed = 18 script.Parent.Parent.Name = "Fighter Bot" if script.Parent.Parent.Humanoid.Health < 1 then print("Robot died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "OOF!" end if script.Parent.Parent.PlayerDeadValue.Value == 1 then print("Player died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "Nice job, but I got you." end move = (math.random(1, 3)) end end if script.Parent.Parent.IsFollowing.Value == 1 then if move == 1 then print("Move == 1, nothing happend") if script.Parent.Parent.Humanoid.Health < 1 then print("Robot died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "OOF!" end if script.Parent.Parent.PlayerDeadValue.Value == 1 then print("Player died") script.Parent.Parent.IsFollowing.Value = 0 script.Parent.Parent.Name = "Nice job, but I got you." end move = (math.random(1, 3)) end end end wait(0.1) if script.Parent.Parent.IsFollowing.Value == 0 then print("IsFollowing equals zero!") end end And just in case, here is the script where he follows you: debounce = false function onTouch(part) local humanoid = part.Parent:findFirstChild("Humanoid") if (humanoid ~=nil) then if debounce == false then debounce = true script.Parent.Parent.IsFollowing.Value = 1 script.Parent.Parent.PlayerName.Value = part.Parent.Name local torso = part.Parent:findFirstChild("Torso") while script.Parent.Parent.Spinning.Value ~= 1 do bin = script.Parent h = script.Parent.Parent.Humanoid Torso = script.Parent.Parent.Torso base = game.Workspace.Base h:MoveTo(torso.Position, (workspace.Base)) wait(0.1) h:MoveTo(Vector3.new(Torso.Position.x, Torso.Position.y, Torso.Position.z), Torso) end end end end script.Parent.Touched:connect(onTouch) Alright, so, he just stands there after a spin. It's all he does, except for him doing another spin. Please, help?
Thegameboy
#62739212Sunday, February 12, 2012 3:56 AM GMT

Bump
CrasyTrex
#62739554Sunday, February 12, 2012 4:02 AM GMT

Output? I rather not read all this code...
Thegameboy
#62741436Sunday, February 12, 2012 4:40 AM GMT

There is no output, everything outputs fine.
Thegameboy
#62757127Sunday, February 12, 2012 4:04 PM GMT

Bump
Thegameboy
#62859093Tuesday, February 14, 2012 5:07 PM GMT

Bump, bump, bump...
jobro13
#62861949Tuesday, February 14, 2012 7:08 PM GMT

What does it do/must it do?
Thegameboy
#62862325Tuesday, February 14, 2012 7:26 PM GMT

Well, I will explain the whole thing. Someone steps on a button, and he starts following you. The technique script is what makes him unique from all the other sword fighting AIs, he actually has moves that will randomly occur. His goal is to kill the player that he is fixated on. His moves are, 1. Spinning. (The one that makes him not able to move, that's the only problem with this whole script) Whenever he spins, he hurts as much as a slash does in normal SFing. 2. Charging at the player and yelling, "YAAAAA!" at him. Whenever he does this, his sword hurts just as much as a lunge does in normal SFing. 3. Does nothing, and just keeps walking towards him. So, as you probably heard, the only thing that does not work is the spinning. Once he is done spinning, he will not follow the player at all, the only time he moves anymore is if he spins again. Of course this is in the beta phase. So there are things that are also not finished in this script. Also these are not all the scripts, the only ones I did not include is the one getting the name of the character, and the sword script. Please help!
Thegameboy
#62884376Wednesday, February 15, 2012 1:39 AM GMT

Bump...

    of     1