generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Teleport random player in a certain team script.

Previous Thread :: Next Thread 
maryn24 is not online. 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
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
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 is not online. 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
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
09 Nov 2015 07:35 PM
It's just going to print empty unless you implement it into your code
Report Abuse
maryn24 is not online. 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 is not online. 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 is not online. maryn24
Joined: 11 Aug 2012
Total Posts: 241
14 Nov 2015 03:07 PM
Sorry wrong forum!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image