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: How are things like hats checked for?

Previous Thread :: Next Thread 
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:02 PM
Like if a player has a certain hat in inventory?
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:04 PM
Any one have any idea how?
Report Abuse
TimeTicks is not online. 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
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:06 PM
Please don't just tell me explain if you can Thank you.
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:08 PM
1
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:09 PM
Can some one explain please.
Report Abuse
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:13 PM
any one.
Report Abuse
TimeTicks is not online. 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
ReverseUniverse is not online. ReverseUniverse
Joined: 23 Jan 2015
Total Posts: 1118
15 Apr 2015 04:18 PM
So where would the hat name be put in?
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