|
| 01 Aug 2015 09:44 PM |
for i, v in pairs (game.Players:GetChildren()) do if v.PlayerStats.runner.Value == true then local spawns = game.Workspace.run:GetChildren() local pickedspawn = spawns[math.random(1, #spawns)] v.Character:MoveTo(Vector3.new(pickedspawn.Position)) elseif v.PlayerStats.chaser.Value == true then v.Character:MoveTo(Vector3.new(game.Workspace.chaser.Position)) end end
havent tested it with runner, but if chaser is true it teleports you to 0, 0, 0 NOT where chaser.Position is. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Aug 2015 09:49 PM |
That means workspace.chaser.Position is nil
If chaser is a Model then that is your problem. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2015 09:50 PM |
its a part
dammit flood post |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 01 Aug 2015 09:52 PM |
Try this:
for i, v in pairs (game.Players:GetChildren()) do if v.PlayerStats.runner.Value == true then local spawns = game.Workspace.run:GetChildren() local pickedspawn = spawns[math.random(1, #spawns)] v.Character:MoveTo(Vector3.new(pickedspawn.Position)) elseif v.PlayerStats.chaser.Value == true then v.Character:MoveTo(game.Workspace.chaser.Position) end end
u sicko! |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2015 09:53 PM |
yeah ^
the Position property is already a Vector3 so you dont need: Vector3.new(part.Position) |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2015 09:54 PM |
it works for chaser, but not runner.
I cant even see a difference. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2015 10:05 PM |
for i, v in pairs (game.Players:GetChildren()) do if v.PlayerStats.runner.Value == true then local thisTorso = v.Character.Torso local bCh = game.Workspace.run:GetChildren() local eww = bCh[math.random(1, #bCh)].CFrame + Vector3.new(0, 5, 0) while thisTorso.CFrame ~= CFrame.new(eww.p) do wait() thisTorso.CFrame = CFrame.new(eww.p) end elseif v.PlayerStats.chaser.Value == true then local thisTorso = v.Character.Torso thisTorso.CFrame = CFrame.new(game.Workspace.chaser.p) end end |
|
|
| Report Abuse |
|
|
| |
|