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: I need help getting this to work

Previous Thread :: Next Thread 
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Oct 2014 05:53 PM
There are no errors in output. It just doesn't work. At first I was scared because I didn't know if my studio would crash or not. Finally I worked up the courage to Enable the script and bam, nothing happens. At all.

The entire point of this function is to check to see how many players have an object called MissionReady in them, and then add them to the number count. Obviously this function is supposed to loop, but I can't use a while true loop because this function will be holding other very important functions on the
"--Function Here" line.

What it's supposed to do is repeat a check of all players until there are at least 2, 3, or 4 players ready to play (depending on voted game mode and team numbers), and then run the game set up function
(We can just call it Setup() for now)


NumberOfTeams = game.ServerStorage.NumberOfTeams
GameplayType = game.ServerStorage.GameplayType

function Inquiry()
local NumberOfReadyPlayers = 0
local ReadyPlayers = game.Players:GetChildren()
for o = 1, #ReadyPlayers do wait()
if ReadyPlayers[o]:findFirstChild("MissionReady") then
NumberOfReadyPlayers = NumberOfReadyPlayers + 1
print(NumberOfReadyPlayers)
else Inquiry() end
end
--Function Here
end Inquiry()
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Oct 2014 06:30 PM
bump
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
11 Oct 2014 06:34 PM
Make a function that gets and returns the number of players with the thing, and whenever normally use NumberOfReadyPlayers use the function
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Oct 2014 06:39 PM
That's exactly what I'm trying to do. I did everything I could think of and failed. That's why I posted about it here.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
11 Oct 2014 06:40 PM
Make a function that ONLY counts the players.
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Oct 2014 06:56 PM
I fail to understand how that would help. I HAVE to check to make sure that object is in their Player object or else I'm going to end up trying to spawn players that are not ready to play.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
11 Oct 2014 06:57 PM
So instead of checking forever, only check when you are about to spawn people in
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
11 Oct 2014 07:23 PM
Forget it. No matter how much I try to explain what I'm planning on doing, nobody understands me. I don't blame you. I blame myself. I'm too stupid to speak clearly. Screw it. I'm done. I give up. Nothing is worth this much trouble.
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