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 » Scripters
Home Search
 

Re: Get buttons of frame

Previous Thread :: Next Thread 
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
03 Oct 2015 08:52 PM
So, I have a table like {{"TeamName",etc,etc,},
{"TeamName2",etc,etc}}
A script detects the table, and makes gui's based on the teams set in the table. So you'de see a gui saying TeamName and TeamName2 if you were in the groups for these teams. Problem is, I don't want to have to manually add lines of code for the function to team you, sorta like this.

function TeamMe()
-- detect button clicked
-- team player
end
for _,v in pairs(script.Parent.TeamsFrame:GetChildren()) do
v.MouseButton1Down:connect(TeamMe)
end

I want to turn
function TeamMe()
-- detect button clicked
-- team player
end
Team1.MouseButton1Down:connect(TeamMe)
Team2.MouseButton1Down:connect(TeamMe)
Team3.MouseButton1Down:connect(TeamMe)
Team4.MouseButton1Down:connect(TeamMe)

to

function TeamMe()
-- detect button clicked
-- team player
end
Buttons.MouseButton1Down:connect(TeamMe)

Note: I know how to team, im asking about the buttons. Not teaming.

I've done nothing but teleport my cat for 4 days.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
03 Oct 2015 09:53 PM
bump


I've done nothing but teleport my cat for 4 days.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2015 09:41 AM
bump2


I've done nothing but teleport my cat for 4 days.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
04 Oct 2015 10:34 AM
bump3


I've done nothing but teleport my cat for 4 days.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
07 Oct 2015 09:53 AM
bump4


I've done nothing but teleport my cat for 4 days.
Report Abuse
Stiiky is not online. Stiiky
Joined: 15 Jan 2010
Total Posts: 451
15 Jul 2016 03:26 PM
bump5


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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