|
| 26 Oct 2014 05:27 AM |
The script is suppose to move the AI into it's spawn position but when it moves the torso to the position it dies. Help?
player = script.Parent.Parent.Parent.Parent.Parent money = player.leaderstats.Cash cost = 50 upgradeStuff = game.ServerStorage["Scout Defender"]
function buy() if money.Value >= 50 then money.Value = money.Value - cost roll = math.random(1,6) local a = upgradeStuff:clone() a.Parent = game.Workspace a.Humanoid.Health = 250 if roll == 1 then a.Torso.Position = game.Workspace.Spawn1.Position elseif roll == 2 then a.Torso.Position = game.Workspace.Spawn2.Position elseif roll == 3 then a.Torso.Position = game.Workspace.Spawn3.Position elseif roll == 4 then a.Torso.Position = game.Workspace.Spawn4.Position elseif roll == 5 then a.Torso.Position = game.Workspace.Spawn5.Position elseif roll == 6 then a.Torso.Position = game.Workspace.Spawn6.Position end end end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 26 Oct 2014 05:47 AM |
| move the model using MoveTo |
|
|
| Report Abuse |
|
|
|
| 26 Oct 2014 02:18 PM |
| The model itself or just the torso? |
|
|
| Report Abuse |
|
|
FauxHawke
|
  |
| Joined: 08 Jun 2012 |
| Total Posts: 2190 |
|
|
| 26 Oct 2014 02:32 PM |
model itself
Never trust atoms, they make up everything.™ |
|
|
| Report Abuse |
|
|
|
| 26 Oct 2014 04:20 PM |
| So how would it look like in code? Never used MoveTo this way. |
|
|
| Report Abuse |
|
|