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: Is there something like, if total players = 15 then

Previous Thread :: Next Thread 
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:15 PM
Is there something like that?
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 10:16 PM
if Game:GetService("Players").NumPlayer == 15 then


if #Game:GetService("Players"):GetPlayers() == 15 then
Report Abuse
IlIll is not online. IlIll
Joined: 28 Aug 2011
Total Posts: 896
12 Oct 2013 10:16 PM
if #game.Players:GetChildren() == 15 then


???
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
12 Oct 2013 10:18 PM
Hah blocco you just got owned.
Report Abuse
FrozenSmite is not online. FrozenSmite
Joined: 17 Jul 2013
Total Posts: 2242
12 Oct 2013 10:20 PM
Isnt... blocco's more effective?

♫♪ repeat wait() until game.Players.FrozenSmite.HasALife == true ♪♫
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
12 Oct 2013 10:20 PM
It`s more efficient and works in more situations, I don`t know why you are saying that he got owned.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
12 Oct 2013 10:22 PM
For his use its shorter. Therefor faster.

And on the scripters forum they're people that care about that.
Report Abuse
IlIll is not online. IlIll
Joined: 28 Aug 2011
Total Posts: 896
12 Oct 2013 10:23 PM
I don't know anything...
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 10:29 PM
What? Mine is clearly better in all possible ways.
Report Abuse
FrozenSmite is not online. FrozenSmite
Joined: 17 Jul 2013
Total Posts: 2242
12 Oct 2013 10:35 PM
Except u capitalized Game :3
Or can you do that? O_O

♫♪ repeat wait() until game.Players.FrozenSmite.HasALife == true ♪♫
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 10:36 PM
Oh, you can do that. And btw it's `NumPlayers` not `NumPlayer`, I had a typo
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:41 PM
So is NumPlayer. the number on the list

example the one on the top of the list is NumPlayer 1?
Report Abuse
FrozenSmite is not online. FrozenSmite
Joined: 17 Jul 2013
Total Posts: 2242
12 Oct 2013 10:42 PM
No, im pretty sure its the amount of players (Just a info value)

♫♪ repeat wait() until game.Players.FrozenSmite.HasALife == true ♪♫
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:45 PM
to find a player can you go Players:GetChildren and then do like find #1?
Report Abuse
chairman154 is not online. chairman154
Joined: 04 Jan 2013
Total Posts: 126
12 Oct 2013 10:46 PM
game.Players:GetChildren()[1]

is player #1
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:46 PM
sweet
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 10:47 PM
Don't use that. Use :GetPlayers().
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
12 Oct 2013 10:50 PM
GetPlayers is a function..
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:53 PM
local part2 = game.workspace.part2
if game:GetService("Players").NumPlayers == 1 then
game.Players:GetChildren()[1]:MoveTo(part2.Position + Vector3.new(0, 5, 0))
end

Will that work?
If there is 1 Player then Player 1 will move to Part2
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 10:53 PM
@Soquick: I mean, use GetPlayers as opposed to GetChildren when dealing with the Players service and wanting only Players
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 10:56 PM
Would my script work?
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
12 Oct 2013 10:58 PM
I know blocco.
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 11:00 PM
local part2 = game.workspace.part2
if game:GetService("Players").NumPlayers == 1 then
game.Players:GetChildren()[1]:MoveTo(part2.Position + Vector3.new(0, 5, 0))
end

Will that work?
If there is 1 Player then Player 1 will move to Part2

Please tell me if it works??
Report Abuse
FrozenSmite is not online. FrozenSmite
Joined: 17 Jul 2013
Total Posts: 2242
12 Oct 2013 11:06 PM
Yes, JonathanZarb.
Just capitalize Workspace in game.workspace
local part2 = game.Workspace.part2
if game:GetService("Players").NumPlayers == 1 then
game.Players:GetChildren()[1]:MoveTo(part2.Position + Vector3.new(0, 5, 0))
end

♫♪ repeat wait() until game.Players.FrozenSmite.HasALife == true ♪♫
Report Abuse
JonathanZarb is not online. JonathanZarb
Joined: 02 Jul 2012
Total Posts: 5027
12 Oct 2013 11:22 PM
Doesn't work...
I'm joining a the game alone and it's not teleporting me to the part?
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