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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 15 Jan 2010 |
| Total Posts: 451 |
|
| |
|