cxcharlie
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
|
| 02 Aug 2013 11:33 PM |
wait(.1) local player = game.Players.LocalPlayer local stats = player:WaitForChild("LightingInfo") local stage = stats:WaitForChild("Stage") local checkpoints = game.Workspace:WaitForChild("CC") if checkpoints then one = checkpoints:findFirstChild("1") end
player.CharacterAdded:connect(function(thing) wait(.1) if thing.Name==player.Name then areplayer = game.Players:GetPlayerFromCharacter(thing) if areplayer~= nil then if areplayer == player then character = thing while character == nil or character:findFirstChild("Torso") == nil or character.Humanoid.Health<0 do wait() end if stage.Value == 1 or stage.Value == "1" then print("character is here") print("1") local rand = {"Pos1","Pos2","Pos3"} local randdy = rand[math.random(1,#rand)] print(randdy) if randdy == "Pos1" then print("POS1") character.Torso.CFrame = one.CFrame + Vector3.new(math.random(-3,3),3.333,math.random(-3,3)) wait(.09) character.Torso.CFrame = one.CFrame + Vector3.new(math.random(-3,3),3.333,math.random(-3,3)) elseif randdy =="Pos2" then print("POS2") wait(.05) character.Torso.CFrame = CFrame.new(78.979, 19.163, 53.171)+Vector3.new(math.random(-1,1),3.333,math.random(-1,1)) elseif randdy == "Pos3" then print("POS3") wait(.05) character.Torso.CFrame = CFrame.new(76.753, 21.338, 59.531)+Vector3.new(math.random(-1,1),3.333,math.random(-1,1)) end--random
elseif stage.Value == 0 or stage.Value =="0" then local rand = {"Pos1","Pos2","Pos3"} local randdy = rand[math.random(1,#rand)] if randdy == "Pos1" then wait(.05) character.Torso.CFrame = CFrame.New(13.939, 1.3, -6.817)+Vector3.new(math.random(-1,1),0,math.random(-1,1)) elseif randdy == "Pos2" then wait(.05) character.Torso.CFrame = CFrame.New(14.075, 1.3, -1.781)+Vector3.new(math.random(-1,1),0,math.random(-1,1)) elseif randdy == "Pos3" then wait(.05) character.Torso.CFrame = CFrame.New(13.899, 1.3, -12.394)+Vector3.new(math.random(-1,1),0,math.random(-1,1)) end--random elseif stage.Value ~= 1 or 0 then wait(.1) print("not 1") character.Torso.CFrame =checkpoints:findFirstChild(stage.Value).CFrame+Vector3.new(math.random(-2,2),1,math.random(-2,2)) end--stage is 1 ? end--is right player? end--is not nil? end--same name? end)--end function
|
|
|
| Report Abuse |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 02 Aug 2013 11:34 PM |
| At least tell us where the error occurs. Or provide the output if there is any. |
|
|
| Report Abuse |
|
cxcharlie
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
| |
cxcharlie
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
| |