|
| 15 Sep 2013 04:26 PM |
Wasn't working at first, but then I realized that "finish" was capitalized so I fixed that, then I tested it and the game just started to crash after about 3 seconds after the message popped up the game would just crash. I tested this in play mode too and I honestly have no idea what's wrong, please help me out, here is the script:
local maps = { game.Lighting.Waterways }
function chooseAndLoadMap() local chosen = maps[math.random(1,#maps)] local map = chosen:clone() map.Parent = workspace return map end
local msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = ("Race your opponents to the end of the map!") wait(3) msg:remove() local player = game.Players:GetPlayers() for i = 1, #player do player[i].Character:MoveTo(Vector3.new(348, 18, -130)) end
function getWinner(map) map.finish.Touched:connect(function(hit) if hit.Parent.Parent:IsA("Player") then return hit.Parent.Parent end end) end
while true do --TODO: Countdown function --TODO: Wait for enough players function local map = chooseAndLoadMap()
--TODO: Teleport players function -- Display messages and stuff local winner = getWinner(map) --TODO: Teleport players back and destroy the map functions end
/watch?v=jofNR_WkoCE |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 15 Sep 2013 04:27 PM |
| Do you have a wait() in the while true do? |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 04:31 PM |
I hate wait()'s and a while true do, but they aren't connected
/watch?v=jofNR_WkoCE |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 04:38 PM |
bumpppp
/watch?v=jofNR_WkoCE |
|
|
| Report Abuse |
|
|
Reyne
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 586 |
|
|
| 15 Sep 2013 04:39 PM |
| while wait() do works better. |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 04:54 PM |
That helped remove the crash but now when you get teleported it's extremely laggy
/watch?v=jofNR_WkoCE |
|
|
| Report Abuse |
|
|
|
| 15 Sep 2013 05:15 PM |
mor halp
/watch?v=jofNR_WkoCE |
|
|
| Report Abuse |
|
|