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: Player's team?

Previous Thread :: Next Thread 
andrei012 is not online. andrei012
Joined: 05 Nov 2010
Total Posts: 279
05 Aug 2013 02:46 AM
how do you recognize players team? lets say he touched a brick and the scipt will print his team name not teamcolor thanks :)
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
05 Aug 2013 02:48 AM
teams = game.Teams:GetTeams()

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Character = hit.Parent
Player = game.Players:GetPlayerFromCharacter(Character)
for i, team in pairs(teams) do
if Player.TeamColor == team.TeamColor then
print(team.Name)
end
end
end
end)
Report Abuse
andrei012 is not online. andrei012
Joined: 05 Nov 2010
Total Posts: 279
05 Aug 2013 02:50 AM
Thx but can you tell me what does these things do??
for i, team in pairs(teams) do
What is I,V,etc i commonly see them in scripts
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
05 Aug 2013 02:52 AM
I don't have time to explain it, just read this:

http://wiki.roblox.com/index.php/Pairs#pairs
Report Abuse
andrei012 is not online. andrei012
Joined: 05 Nov 2010
Total Posts: 279
05 Aug 2013 02:59 AM
Should i add a debouncer?
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
05 Aug 2013 03:00 AM
Probably.
Report Abuse
andrei012 is not online. andrei012
Joined: 05 Nov 2010
Total Posts: 279
05 Aug 2013 03:01 AM
but idk how in those kind of functions .-.
Report Abuse
andrei012 is not online. andrei012
Joined: 05 Nov 2010
Total Posts: 279
05 Aug 2013 03:02 AM
nvm fixed it thanks
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