skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 03 Jan 2013 05:13 PM |
So I made this script that moves the player to a random position once they enter, but all it's doing is moving the player to a random position once then when they reset they respawn at the center of the map. And this happens after every respawn.
script:
game.Players.ChildAdded:connect(function(plyr) repeat wait() until plyr.Character plyr.Character.Torso.CFrame = CFrame.new(math.random(1, 100), 7, math.random(1, 100)) end)
wiki.roblox.com |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 03 Jan 2013 05:14 PM |
game.Players.PlayerAdded:connect(function(plyr) plyr.CharacterAdded:connect(function(char) repeat wait() until plyr.Character plyr.Character.Torso.CFrame = CFrame.new(math.random(1, 100), 7, math.random(1, 100)) end) end) |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2013 05:15 PM |
game.Players.ChildAdded:connect(function(plyr) repeat wait() until plyr.Character plyr.CharacterAdded:connect(function (character) character.Torso.CFrame = CFrame.new(math.random(1, 100), 7, math.random(1, 100)) end) end)
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】 |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2013 05:17 PM |
@ninja and jonah You realize if you have the characteradded event, you don't need the repeat statement? |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2013 05:17 PM |
There's no need to wait for the Character, if the Character Loaded...
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) char.Torso.CFrame = CFrame.new(math.random(1, 100), 7, math.random(1, 100)) end) end) |
|
|
| Report Abuse |
|
|
skate1011
|
  |
| Joined: 13 Mar 2010 |
| Total Posts: 688 |
|
|
| 03 Jan 2013 05:19 PM |
It stopped working once I removed the repeat until script.
wiki.roblox.com |
|
|
| Report Abuse |
|
|