|
| 08 Jul 2014 11:55 PM |
I've had this issue for far too long, And I cannot figure it out.
I'm trying to check if a model was updated. If so, replace the old one with the new one using InsertService. The only issue is that I cannot get the latest version of the model on that server, unless I join a new server.
Please help with this problem. I've tried sets, and I cannot grab a certain player's set - so that won't work.
I'll pay 500 robux to the user that can fix this first, because no one cares to help. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 12:08 AM |
| So you can detect when a model is updated, but you cannot load the updated version, just the previous version? You tried InsertService:LoadAsset(assetId) and that didn't work? |
|
|
| Report Abuse |
|
|
newslate
|
  |
| Joined: 10 Jun 2014 |
| Total Posts: 217 |
|
|
| 09 Jul 2014 12:10 AM |
| http://www.roblox.com/Forum/ShowPost.aspx?PostID=139671645 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 12:25 AM |
newslate, that didn't work.
And yes, LoadAsset only gets the old asset, not the updated one. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2014 12:58 AM |
Fix; id = ##### OriginalAsset = game:GetService("MarketplaceService"):GetProductInfo(id)
durationbetween = 60
while true do wait(durationbetween) Asset = game:GetService("MarketplaceService"):GetProductInfo(id) if Asset.Updated ~= OriginalAsset.Updated then print('load model with your code here') end end
|
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:19 AM |
| See, if I upload a model once, every other time I insert it - It will get that model version I inserted earlier. If I updated the model, it will not insert the newest version. |
|
|
| Report Abuse |
|
|
cade2000
|
  |
| Joined: 09 Aug 2009 |
| Total Posts: 887 |
|
|
| 09 Jul 2014 01:27 AM |
I also want to know how to do this. And... You're awesome buildintogames! :D |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2014 01:32 AM |
It seems I have to use LoadAssetVersion
How does this work?
Game:GetService("InsertService"):LoadAssetVersion(the version num, the model ID) right?
|
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:34 AM |
So I have to use it in a set, good.
One issue : How Can i get a certain player's Sets? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Jul 2014 02:13 AM |
| http://wiki.roblox.com/index.php?title=GetUserSets_(Method) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 12:59 PM |
@Free
I'm trying to get a specific user's sets, not the client of the script. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:02 PM |
It doesn't have to be the client of the script
use it like this:
GetUserSets( Integer userId ) |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jul 2014 01:08 PM |
If you used that Id, you'd get this guys sets:
http://www.roblox.com/User.aspx?ID=1938404 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:14 PM |
set = game:GetService("InsertService"):GetCollection(game:GetService("InsertService"):GetUserSets(19717956)[1].AssetSetId)[1].AssetId item = Game:GetService("InsertService"):LoadAssetVersion(set) item.Parent = game.ServerStorage
This is what I have so far - but it puts an empty model in ServerStorage...
I need it to get the updated first model in my GD2 set, and load it into serverstorage. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:22 PM |
| Maybe you could try 'game:GetService("InsertService"):ApproveAssetVersionId(set)' on the line before you load in the asset. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:26 PM |
set = game:GetService("InsertService"):GetCollection(game:GetService("InsertService"):GetUserSets(19717956)[1].AssetSetId)[1].AssetId game:GetService("InsertService"):ApproveAssetVersionId(set) item = Game:GetService("InsertService"):LoadAssetVersion(9,set) item.Parent = game.ServerStorage
I get this error, and an empty model:
Content failed to parse for http://www.roblox.com/Asset/?assetversionid=9&serverplaceid=0&clientinsert=0 because tag expected after Byte-Order-Mark |
|
|
| Report Abuse |
|
|
| |
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 09 Jul 2014 01:38 PM |
You can get the latest AssetVersionID by using HttpService.
function LoadAsset(assetId) local avid = game:GetService("HttpService"):GetAsync("http://rproxy.".."t".."k/studio/plugins/info?assetId="..assetId):match("value=\"(%d+)") return game:GetService("InsertService"):LoadAssetVersion(avid) end
local item = LoadAsset(id) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:49 PM |
You could also try this script.
InsertService = game:GetService("InsertService") Sets = InsertService:GetUserSets(19717956) Set = Sets[1] SetId = Set.AssetSetId Collection = InsertService:GetCollection(SetId) Model = Collection[1] AssetId = Model.AssetVersionId InsertedModel = InsertService:LoadAssetVersion(AssetId) InsertedModel.Parent = game.ServerStorage |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 01:53 PM |
| Robo, it's giving me my latest model for some odd reason, not the first model in my first set... |
|
|
| Report Abuse |
|
|