|
| 15 Apr 2015 04:02 PM |
| Like if a player has a certain hat in inventory? |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:04 PM |
| Any one have any idea how? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Apr 2015 04:05 PM |
for i,v in pairs(game.Players:GetChildren()) do for i,x in pairs(v.Character:GetChildren()) do if x:IsA("Hat") or x:IsA("Accoutrement") then print(x.Name) end end end
|
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:06 PM |
| Please don't just tell me explain if you can Thank you. |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Apr 2015 04:09 PM |
| Can some one explain please. |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 15 Apr 2015 04:13 PM |
That loops through the Players and gets the children then it loops through the players Character and gets the children (the model in the workspace) then it checks if the children of the Character (IsA) Hat, our Accoutrement then if the children is a Hat or Accourtement then it prints the name of the object then the script ends. |
|
|
| Report Abuse |
|
|
|
| 15 Apr 2015 04:18 PM |
| So where would the hat name be put in? |
|
|
| Report Abuse |
|
|