|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 07 Sep 2016 08:30 PM |
B1 Could anyone help me out on this?
|
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 07 Sep 2016 08:34 PM |
| I believe it's hat.Handle.Mesh? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|