ez_streetJoin Date: 2013-07-11 Post Count: 364 |
Normally, images are rendered by taking the address id and subtracting one. For some reason, I'm debugging it and it's only working when I subtract different numbers. For every image I have made, for some reason I have to subtract 3, for some 5. Does anyone know why this is happening? |
|
|
Roblox is growing and more people are updating images and such, causing a larger separation in the IDs |
|
|
Roblox is getting so many assets uploaded no a days that subtracting 1 isn't good enough. Just go to the develop page and get the ID from there. |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
Yeah, I go to the develop page, click the decal I made, and I take the address id. So should I just test the images' difference from rendering to their actual id, and subtract that number? |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
I have another question. Will the images' id's be changed at all as more images are made, or will they stay put? |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
local model = game:GetService("InsertService"):LoadAsset(yourOriginalIdHere)
local item = model:GetChildren()[1] -- your object, whether a shirt or decal or mesh, etc
Then depending on the type of your object, you will either get the item.Texture or TextureId or whatever the property is |
|
darkhenryJoin Date: 2010-05-08 Post Count: 85 |
im a soybeen fan |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
So does this service return the number of the correct id? |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
@darkhenry ## ########## Not quite. It will load the object, then you unpack it from the model, and then seek out its property that identifies the ID of its texture. |
|
darkhenryJoin Date: 2010-05-08 Post Count: 85 |
oh my god he noticed me! <3
sorry lol |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
So I would do m.Value as the correct texture id? |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
So let me explain further
model = game:GetService("InsertService"):LoadAsset(originalIDHere)
This model is just an ordinary Model object that contains only ONE child. That's your object, whether it's a shirt or decal or whatever.
To get that child, we say:
item = model:GetChildren()[1]
Now, you wanna get the assetId of whatever texture that item is using. If it's a decal, that would just be the Texture property, and so you'd say
trueId = item.Texture
^ now blam, that's your true ID |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
Yeah, I'm a pretty proficient scripter but I didn't know it would start messing with the subtracting number. Thanks so much! |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜#####( ͡° ͜ʖ ͡°) |
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
I'm not that good at #### services: what is this error? #### 404 ######### 404 ################################################################################################### Stack Begin Script 'Players.ez_street.PlayerGui.HUD.hud', Line 40 Stack End Basically, it says there is a 404 error, but I don't understand why it is causing the error when I try to load the asset. Sorry about the hashtags (I'm 13+ and it still shows this). |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Make sure you're inputting to the :LoadAsset() function what you are seeing on the site, not its texture ID.
|
|
ez_streetJoin Date: 2013-07-11 Post Count: 364 |
Yeah, nevermind, I fixed it. |
|