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
 

No output, Team script

Previous Thread :: Next Thread 
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
03 Aug 2012 07:42 PM
--Xnite515--

for i, c in pairs(game.Teams.Team:GetChildren()) do --Change team to which team is the home team.
print("Index: ", index) print("Child: ", child)
if index <= 5 then
a = Instance.new("Message",workspace)
print("5")
a.Text = "There needs to be 5 TRA members to start raiding"
wait(1)
repeat until
index >= 5 do
a:Remove()
end
end end
Report Abuse
TinpotOps is online. TinpotOps
Joined: 22 Jul 2012
Total Posts: 813
03 Aug 2012 07:59 PM
If the output doesn't work or nothing shows up, you usually need to reset and then try again. (:

your "friendly" TGI helper.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
05 Aug 2012 11:25 PM
e.e
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
05 Aug 2012 11:35 PM
"for i, c in pairs(game.Teams.Team:GetChildren()) do --Change team to which team is the home team."

What are the children of "Team"?
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
05 Aug 2012 11:46 PM
Team is the team's name lol.

Children: The players in it.
Report Abuse
Superbruke1 is not online. Superbruke1
Joined: 20 Jul 2012
Total Posts: 48
06 Aug 2012 12:12 AM
I'm not sure if that would work. Here's my best attempt at checking the number of players:

while true do
local num=0
for i, c in pairs(game.Players:GetChildren()) do
if c.TeamColor==game.Teams["TEAMNAMEHERE"].TeamColor then
num=num+1 end end
if num < 5 then
a = Instance.new("Message",workspace)
print("5")
a.Text = "There needs to be 5 TRA members to start raiding"
wait(1)
a:destroy()
else
wait(5)
end end
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
06 Aug 2012 12:22 AM
g = game.Teams.Team:GetPlayers() --Change team to which team is the home team.
index = #g
if index <= 5 then
a = Instance.new("Message",workspace)
print("5")
a.Text = "There needs to be 5 TRA members to start raiding"
wait(1)
repeat wait()
until index >= 5
a:Remove()
end
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