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 » Scripting Helpers
Home Search
 

Re: Auto Update Model? (Paying 500 robux to solver)

Previous Thread :: Next Thread 
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
socccerstar is not online. socccerstar
Joined: 23 Aug 2008
Total Posts: 489
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 is not online. 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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
09 Jul 2014 12:52 AM
Why can you not use sets?
Report Abuse
Brickman2010 is not online. Brickman2010
Joined: 20 Nov 2009
Total Posts: 5547
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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 is not online. 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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
09 Jul 2014 01:29 AM
bummmp
Report Abuse
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
09 Jul 2014 01:36 AM
bump
Report Abuse
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
09 Jul 2014 01:42 AM
buuuump
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
09 Jul 2014 02:13 AM
http://wiki.roblox.com/index.php?title=GetUserSets_(Method)
Report Abuse
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
Brickman2010 is not online. Brickman2010
Joined: 20 Nov 2009
Total Posts: 5547
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
09 Jul 2014 01:07 PM
So,

GetUserSets(1938404)
Report Abuse
Brickman2010 is not online. Brickman2010
Joined: 20 Nov 2009
Total Posts: 5547
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
robokittydestroyer is not online. robokittydestroyer
Joined: 20 Jul 2010
Total Posts: 311
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
09 Jul 2014 01:37 PM
bump
Report Abuse
oxcool1 is not online. 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
robokittydestroyer is not online. robokittydestroyer
Joined: 20 Jul 2010
Total Posts: 311
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
BuildIntoGames is not online. BuildIntoGames
Joined: 02 Sep 2011
Total Posts: 6634
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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