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 the Mesh/Texture Id from any Catalog Hat Item

Previous Thread :: Next Thread 
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:11 PM
How would one be able to get the Texture Id and the Mesh Id from any Hat within a game? I am not sure about this as they are different for each one.

I am using GetProductInfo by the way.


Any help is greatly appreciated!! ^-^


Report Abuse
rapmilo is not online. rapmilo
Joined: 16 Aug 2011
Total Posts: 69
07 Sep 2016 08:15 PM
Didn't you ask this before. Bump your previous post...
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:16 PM
No that was how to get the hat from the catalog. I could bump that post, but it would confuse a lot of people I feel.


Report Abuse
CodeBreadpudding is not online. CodeBreadpudding
Joined: 24 Aug 2016
Total Posts: 1286
07 Sep 2016 08:29 PM
Players can wear up to 3 hats, this can make selecting a player have multiple return values.
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:30 PM
B1 Could anyone help me out on this?


Report Abuse
CodeBreadpudding is not online. CodeBreadpudding
Joined: 24 Aug 2016
Total Posts: 1286
07 Sep 2016 08:34 PM
Okay since you don't care about my warning I'll give you this:
pastebin
/10SWrqLw
The script will return a list of all the hats on a player
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:34 PM
I believe it's hat.Handle.Mesh?
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:37 PM
Or, more accurately, a script something like this would print out the ids in the studio

player = game.Players:WaitForChild('Player1')

hat = player.Character['Hat Name Here'].Mesh
print(hat.MeshId)
print(hat.TextureId)
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:38 PM
My bad, replace
'hat = player.Character['BigHead'].Mesh
print(hat.MeshId)
print(hat.TextureId)'

with
'hat = player.Character['BigHead'].Handle.Mesh
print(hat.MeshId)
print(hat.TextureId)'
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:38 PM
@Bread

I am removing all the hats from the player, forgot to mention that, sorry.
I am trying to get the Mesh and Texture Id's from the Hat ID that the player puts in.
That is what I need help on. I don't want the entire code. I don't learn that way. I just need a place to start.


Report Abuse
CodeBreadpudding is not online. CodeBreadpudding
Joined: 24 Aug 2016
Total Posts: 1286
07 Sep 2016 08:39 PM
After using my fixed function /CRAzeCDw you can access hat data like this:
h[1].Handle.Mesh.MeshId
or
h[1].Handle.Mesh.TextureId
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:41 PM
Or, if you mean get a list of all the hats in the game, use a for loop that checks everything in workspace and checks if it's ClassName == Hat
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:43 PM
@Bread

Ok, we are not on the same page. What your code is doing is it is getting the hats from the player that the player is already wearing and adding them to a table.

What I need help on: Player enters Hat ID (For example: 1029025 (Universal Fedora I believe)). That is the Hat ID, not the texture ID or Mesh ID. I need help getting the Texture ID and Mesh ID from whatever hat ID the player enters, not what they are already wearing.


Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 08:54 PM
Bumperoono


Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 09:11 PM
Bump Trump


Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
07 Sep 2016 09:32 PM
Bumpity bump bump


Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
08 Sep 2016 04:22 PM
Is there a way...?


Report Abuse
XBLAX is not online. XBLAX
Joined: 06 Apr 2012
Total Posts: 82
08 Sep 2016 04:38 PM
Indeed there is, but you will have to download the hat's.

To do this you first need the hat's ID, then go to your browser and type in "roblox.com/asset/?id="HAT_ID in to your search bar, then save the file to your computer.

You have to save the hat as a file roblox can interpret, this being a ".rbxm" file. By default it would be saved as a ".txt", make sure it's not otherwise it will not work.

Next go in to studio and right click on workspace. In the drop-down menu look for "Insert from file" and import your hat. Done!
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
08 Sep 2016 04:39 PM
why do you want the mesh when you can literally just use the API :/
http://wiki.roblox.com/index.php?title=Web_APIs#Asset_thumbnail
Report Abuse
XBLAX is not online. XBLAX
Joined: 06 Apr 2012
Total Posts: 82
08 Sep 2016 04:39 PM
And I just realised you wanted to do this via script. I apologise as i do not know how.
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
08 Sep 2016 05:06 PM
@blarg

How would I use your method exactly? The wiki isn't really clear (or gives any explanation on that).
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
08 Sep 2016 05:07 PM
you just use the link with an asset id and it will show the thumbnail as an image/decal :/
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
08 Sep 2016 05:09 PM
Well yeah. But I mean, will the hat work? Like will it look like what is suppose to, and will it work like a hat? :P

Btw, thanks for helping me out.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
08 Sep 2016 05:11 PM
do you know what an asset is

an Asset on roblox is basically any object that you can request with an ID
and it also exists on the roblox website

so, put in the ID of the asset in any of the resolutions below and it will be a content url

https://www.roblox.com/Thumbs/Asset.ashx?width=110&height=110&assetId=YOUR_ID

== content id for thumbnail
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
08 Sep 2016 05:12 PM
i dont see why you need the mesh/texture when you can just get the thumbnail image
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