|
| 24 Aug 2011 05:16 PM |
i fixed some errors, but it still doesn't work... its supposed to make 10 clones of me that all follow, but it doesn't work at all... i'm running this in SB
for x = 1,10 do un = game.Workspace.MrgamesNwatch:GetChildren() for i = 1,#un do un[i].Archivable = true end c = game.Workspace.MrgamesNwatch c.Archivable = true a = c:Clone() a.Parent = game.Workspace a:MakeJoints() a:MoveTo(game.Players.MrgamesNwatch.Character.Torso.Position) local f = Instance.new("BodyPosition") f.Parent = a.Torso f.position = game.Players.MrgamesNwatch.Character.Torso.Position f.maxTorque = Vector3.new(10000,100000,100000) end
while wait() do for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == "MrgamesNwatch" and v.Torso.BodyPosition ~= nil then v.Torso.BodyPosition.position = game.Players.MrgamesNwatch.Character.Torso.Position end end end |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 05:24 PM |
1. You don't have to use the MoveTo, or the MakeJoints. 2. You don't have to use a for to clone yourself. Just clone yourself as a whole and then insert the BodyPosition into the clone. 3. Isn't there a property in the humanoid that is like WalkToPoint or something? 4. Don't use a while true do for the positioning, just used a changed event on your Torso. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 05:26 PM |
| Umm. Want me to just remake the script? |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Aug 2011 05:34 PM |
| although I'd prefer to keep the BodyVelocity. That way the clones would unrealisticly swarm around me ^.^ |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 07:11 PM |
| this really isn't that complicated yet i cannot get it to work >.< |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:09 PM |
ok, i rewrote the script. the cloning part works fine, but the following part doesn't work at all... there would happen to be no Output which seems to always happen to me :\
local subject = "Player"
for x = 1,10 do un = game.Workspace[subject]:GetChildren() for i = 1,#un do un[i].Archivable = true end c = game.Workspace[subject] Mr = game.Players[subject].Character c.Archivable = true a = c:Clone() a.Parent = game.Workspace a:MakeJoints() a:MoveTo(Mr.Torso.Position) end
print("Minions created")
--Follow part while wait() do for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == subject then local char = v local check = game.Players:GetPlayerFromCharacter(char) if v ~= char then v.Torso.Humanoid:MoveTo(Mr.Torso.Position,Mr.Torso) end end end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Aug 2011 08:20 PM |
| Make sure output is on when you join.. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:21 PM |
| yeah, i had the output open when i ran the script. "minions created" printed and then nothing else. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:27 PM |
| You have that if v ~= char thing in there, make sure v = char, I'm sorry I can't really help you because I have absolutely no experience in pairs/ipairs. >.< |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:29 PM |
| Perhaps its because you try to get the player of the minion? Which = nil? |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:33 PM |
| possibly, i've never used GetPlayerFromCharacter to check it something is the Players Character or not. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:35 PM |
| GetPlayerFromCharacter() gets the person controlling the humanoid in game.Players. The bot isn't being controlled by anyone, therefore it returns nil. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:42 PM |
if char == nil then should fix that part then... i think |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:43 PM |
Tell me how it works out. ~This is my siggy~ |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:46 PM |
:\ same problem no output, but adding a print told me that "if char == nil then" is not doing anything.
for x = 1,10 do un = game.Workspace[subject]:GetChildren() for i = 1,#un do un[i].Archivable = true end c = game.Workspace[subject] Mr = game.Players[subject].Character c.Archivable = true a = c:Clone() a.Parent = game.Workspace a:MakeJoints() a:MoveTo(Mr.Torso.Position) end
print("Minions created")
while wait() do for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == subject then local char = v local check = game.Players:GetPlayerFromCharacter(char) if char == nil then print("following") v.Humanoid:MoveTo(Mr.Torso.Position,Mr.Torso) end end end end |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:50 PM |
Why do you have 4 ends? You only need 3. As for moving on the top...I think it has to be a.Humanoid. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:52 PM |
| 2 if statements 2 loops = 4 ends. What do you mean by ".Humanoid" |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:55 PM |
for x = 1,10 do un = game.Workspace[subject]:GetChildren() for i = 1,#un do un[i].Archivable = true end c = game.Workspace[subject] Mr = game.Players[subject].Character c.Archivable = true a = c:Clone() a.Parent = game.Workspace a:MakeJoints() a.Humanoid:MoveTo(Mr.Torso.Position) --here end
print("Minions created")
while wait() do for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == subject then local char = v local check = game.Players:GetPlayerFromCharacter(char) if char == nil then print("following") v.Humanoid:MoveTo(Mr.Torso.Position,Mr.Torso) --you do it right here end end end end |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:56 PM |
for x = 1,10 do un = game.Workspace[subject]:GetChildren() for i = 1,#un do un[i].Archivable = true end c = game.Workspace[subject] Mr = game.Players[subject].Character c.Archivable = true a = c:Clone() a.Parent = game.Workspace a:MakeJoints() a.Humanoid:MoveTo(Mr.Torso.Position) --here end
print("Minions created")
while wait() do for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == subject then local char = v local check = game.Players:GetPlayerFromCharacter(char) if check == nil then --change from char to check print("following") v.Humanoid:MoveTo(Mr.Torso.Position,Mr.Torso) --you do it right here end end end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Aug 2011 09:02 PM |
| Thanks Tech! i just needed to change char to check like you said. btw the first MoveTo is for the position of the model EX: game.Workspace.Model:MoveTo(Vector3.new(0,10,0)) |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 06:50 AM |
| You don't mind if I use this too, do you? |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 11:45 AM |
| you can use this version. i plan on adding on anyways :P |
|
|
| Report Abuse |
|
|