|
| 03 May 2015 10:35 AM |
Here is a script that I scripted awhile back, i'm wondering why it doesn't seem to work... function pickRandomTwo() if game.Players.NumPlayers >= 2 then local r1 = game.Players:GetChildren()[math.random(1,#game.Players:GetPlayers())] if r1 ~= nil then local randomPlayer1 = r1 end repeat local r2 = game.Players:GetChildren()[math.random(1,#game.Players:GetPlayers())] until r1 ~= r2 if r1 ~= randomPlayer2 and randomPlayer1 ~= nil then local randomPlayer2 = r2 end end end
function gameStart() pickRandomTwo() if randomPlayer1 ~= nil and randomPlayer2 ~= nil then local Player1 = game.Players:FindFirstChild(randomPlayer1.Name) local Player2 = game.Players:FindFirstChild(randomPlayer2.Name) if Player1 ~= nil and Player2 ~= nil then randomPlayer1 = Player1 randomPlayer2 = Player2
randomPlayer1:MoveTo(Vector3.new(20.3, 6.09, -10.5)) randomPlayer2:MoveTo(Vector3.new(-52.4, 6.09, -10.5))
end end end
|
|
|
| Report Abuse |
|
Exail
|
  |
| Joined: 08 Jan 2010 |
| Total Posts: 13355 |
|
|
| 03 May 2015 10:47 AM |
Hello, BlazertheObserver! I am sorry to see you're in need of help, I wouldn't suggest posting it here, instead.. you should post it in the Scripting Section!
MY PRAISING IS INTENSIFYING OF THE SUN. |
|
|
| Report Abuse |
|