devLucas
|
  |
| Joined: 10 Dec 2013 |
| Total Posts: 526 |
|
|
| 20 Mar 2014 08:26 PM |
When the player enters I create a brick in a random space for them to TP to, but they get this really weird camera glitchyness inside the block, and it starts to lag really bad, really fast. Any fix?
Player is defined through a PlayerAdded function.
local Part = Instance.new("Part", Workspace) Part.Anchored = true Part.Size = Vector3.new(15,15,15) Part.Position = Vector3.new(math.random(1,9999999),math.random(1,9999999),math.random(1,9999999)) repeat wait() until Player.Character wait(5) Player.Character:MoveTo(Part.Position + Vector3.new(0,10,0))
And also, is there a more efficient way to pick a random spot in the game for it to TP to?
|
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 20 Mar 2014 08:28 PM |
>99999999999
shorten that ;.; |
|
|
| Report Abuse |
|
|
devLucas
|
  |
| Joined: 10 Dec 2013 |
| Total Posts: 526 |
|
|
| 20 Mar 2014 08:28 PM |
| Well essentially I want the players to be far away as possible :/ |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 20 Mar 2014 08:29 PM |
| why do you think it lags ;) |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 20 Mar 2014 08:30 PM |
| why? is the base that big? |
|
|
| Report Abuse |
|
|
devLucas
|
  |
| Joined: 10 Dec 2013 |
| Total Posts: 526 |
|
|
| 20 Mar 2014 08:30 PM |
| True. Is there any other way to go about this? |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
| |
|
devLucas
|
  |
| Joined: 10 Dec 2013 |
| Total Posts: 526 |
|
| |
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
|
| 20 Mar 2014 08:37 PM |
put this before the player added: num=0
and then this after:
local Part = Instance.new("Part", Workspace) Part.Anchored = true Part.Size = Vector3.new(15,15,15) Part.Position = Vector3.new(num),0,num) repeat wait() until Player.Character num=num+10000 wait(5) Player.Character:MoveTo(Part.Position + Vector3.new(0,10,0)) |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 20 Mar 2014 08:40 PM |
| if you want people to tele so far they die then keep doing that, but keep it client sided. if you want to teleport them randomly across the base then use the base's position vector. |
|
|
| Report Abuse |
|
|