EXYZED
|
  |
| Joined: 09 Nov 2013 |
| Total Posts: 533 |
|
|
| 21 Jan 2017 05:03 PM |
Using a Generic FOR to see if a PLAYER contains a sound. if true then run code.
How would I do this? |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2017 05:04 PM |
for i, v in pairs (player:GetChildren()) if v.Name == sound --string value
|
|
|
| Report Abuse |
|
|
EXYZED
|
  |
| Joined: 09 Nov 2013 |
| Total Posts: 533 |
|
|
| 21 Jan 2017 05:07 PM |
| Thanks for the response. I've encountered another Query. How would I utilise the ChildAdded with this? Say that if a Sound is added to any random player. FireEvent -> function |
|
|
| Report Abuse |
|
|
EXYZED
|
  |
| Joined: 09 Nov 2013 |
| Total Posts: 533 |
|
|
| 21 Jan 2017 05:08 PM |
| In further further addition. The code runs through ALL players. |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 06:56 AM |
player.ChildAdded:connect(function(obj) --connect an anon func to the event if obj.Name == soundName then --todo
|
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 07:02 AM |
| You've asked this like 20 times already |
|
|
| Report Abuse |
|
|