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 » Scripting Helpers
Home Search
 

Re: Ok so this is code

Previous Thread :: Next Thread 
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
10 Apr 2014 07:42 PM
--McChicken72.
plyr = -- i need to define all would i use game:GetPlayers() ?

function MB1D()
game:GetService("TeleportService"):Teleport(0000000, plyr)
end
end)
script.Parent.MouseButton1Down:connect(MB1D)



i have the vote and it works, i just need to define ALL players, the vote btw is when 3 people vote out of 5 in the game, they all tele to place2 (part 2 of the game)

so basically, just define plyr pls
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
10 Apr 2014 07:43 PM
That would return a table of all the players [game.Players:GetPlayers()], so you would have to do something like:


function MB1D()
local plyrs = Game.Players:GetPlayers()
for index, value in next, plyrs do
game:GetService("TeleportService"):Teleport(0000000, value)
end
end
end

script.Parent.MouseButton1Down:connect(MB1D)

This must be in a server-side script as well
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
10 Apr 2014 07:46 PM
I dont get that, so i just replace the 00000 with place ID and im good to go (after i put in the vote)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
10 Apr 2014 07:49 PM
yes, assuming this is not in a local script
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
10 Apr 2014 07:51 PM
It is regular, or it wont teleport all, it would break my vote script.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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