maryn24
|
  |
| Joined: 11 Aug 2012 |
| Total Posts: 241 |
|
|
| 09 Nov 2015 07:26 PM |
| I am in need of help. I need a script that will teleport a random player in the team Contestants. Much like in the fashion game where it teleports one player at a time. The script has to repeat itself til there are no more Contestants left. Thank you! |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2015 07:32 PM |
local selectContestants = function(t) local player = table.remove(t, math.random(#t)); print(player.Name .. " has been selected!"); -- do stuff wait(5.0); end
local contestants = {GetATableOfContestants}; while (#contestants > 0) do selectContestants(contestants); end print("Empty"); |
|
|
| Report Abuse |
|
|
maryn24
|
  |
| Joined: 11 Aug 2012 |
| Total Posts: 241 |
|
|
| 09 Nov 2015 07:34 PM |
| Thank you very much! I'm going to test to see if this works! Thanks :D |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2015 07:35 PM |
| It's just going to print empty unless you implement it into your code |
|
|
| Report Abuse |
|
|
maryn24
|
  |
| Joined: 11 Aug 2012 |
| Total Posts: 241 |
|
|
| 14 Nov 2015 02:40 PM |
| Yeah I am going to put it into another code. I already have one It's just the script the first script of the game isn't working yet so I have to fix it. |
|
|
| Report Abuse |
|
|
maryn24
|
  |
| Joined: 11 Aug 2012 |
| Total Posts: 241 |
|
|
| 14 Nov 2015 03:05 PM |
Well, after looking it up I found part of the script but I don't have everything i need function setTeam(player, teamName) player.TeamColor = game.Teams[Finished].Black if player.Character then --Just in case the character doesn't exist for some reason player.Character:BreakJoints() -- Kills the players' character end end
It won't work well with the other scripts. Like it won't change their specific character |
|
|
| Report Abuse |
|
|
maryn24
|
  |
| Joined: 11 Aug 2012 |
| Total Posts: 241 |
|
| |
|