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: Updating model?

Previous Thread :: Next Thread 
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 07:51 PM
I have a question. Can I make a script that automatically inserts itself if there is a new version available?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 07:54 PM
Yes.

UDATED = 0 -- Replace with the script's ID.
for n,o in pairs(game:GetService("InsertService"):LoadAsset(UPDATED):GetChildren())do
o.Parent = Workspace
end


This will insert the newest "version", of anything.
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:00 PM
So would a model apply to anything? I think it would.
Would this be a simpler version?:
ID=...
o=game:GetService("InsertService"):LoadAsset(ID)
o.Parent=workspace
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:06 PM
Yes, but you'll have an extra instance in your game.
Also, if you're going to use InsertService, make sure you own the model/script you're trying to insert.
Report Abuse
FPShooter319 is not online. FPShooter319
Joined: 28 May 2012
Total Posts: 153
31 May 2012 08:09 PM
Also,

The model has to be a Free Model, or else InsertService won't insert it. And,

@1Topcop,

You can insert any model, even if you don't own it. You just have to make sure it's a FM.

MrMcAero
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:10 PM
Not since March.
InsertService was locked to JUST owning the model in March do to hackers.
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:11 PM
Erm, that's the problem. I am making this for a friend, (and for myself) and I want it to be easy to update. If he has it in his game, and I own the model, my guess it that it won't work...

And what does an instance do in a game? Does it lag it more?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:12 PM
Not unless you insert like 1000 items...
But, if your friend takes the model, (s)he becomes eligible to insert it.
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:15 PM
Going with FPShooter319 said, I think the insert tool still works. The insert tool only worked with free models. Lemme take apart the insert tool and see what I can pull out.
Report Abuse
FPShooter319 is not online. FPShooter319
Joined: 28 May 2012
Total Posts: 153
31 May 2012 08:18 PM
@1Topcop

That's false. A player can still Insert a free model he/she does not own, but MUST still be a Free Model. Just tested.

MrMcAero
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:19 PM
@MrMcAero, did you use Command Bar, or a Script?
Command Bar runs anything, locked or not.
Try it with a script.
Report Abuse
FPShooter319 is not online. FPShooter319
Joined: 28 May 2012
Total Posts: 153
31 May 2012 08:22 PM
@1Topcop

I did. I got a Model from my main account.

MrMcAero
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:24 PM
Did ROBLOX unlock it? :O!
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:25 PM
Would you mind sharing your code? :)
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:26 PM
--- >>>>>
UDATED = 0 -- Replace with the script's ID.
for n,o in pairs(game:GetService("InsertService"):LoadAsset(UPDATED):GetChildren())do
o.Parent = Workspace
end -- <<<<<<
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:28 PM
@1toptcop, simplified?
Report Abuse
FPShooter319 is not online. FPShooter319
Joined: 28 May 2012
Total Posts: 153
31 May 2012 08:28 PM
@1Topcop

Oh, I see what you mean now. :\
Anyway's there actually is still a way to do it, go to your set's, extract the model from there. That's what Stamper Tool does. Takes set's from some guy, and puts them into Workspace.

MrMcAero
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:32 PM
Actually, MrMc, I think ROBLOX just re-unlocked InsertService to be used with FMs! ^_^
I wouldn't use it in scripts though, I'm sure it's just going to be re-locked soon. ._.
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:33 PM
lol not scripts, localscripts :)
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:33 PM
And as for the most simplified InsertService script.
game:GetService("InsertService"):LoadAsset([Id]).Parent = Workspace
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:41 PM
Here is what I have, and it isn't working. Do I need to have the URL, or just the id code?

ID=82276646

root = game:GetService("InsertService"):LoadAsset(82276646)
root.Parent=workspace
root.Position=Vector3.new(0,0,0) -- Will take out when it is just scripts
root.Name="Model"
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:44 PM
ID=82276646

root = game:GetService("InsertService"):LoadAsset(82276646) -- Why have a variable if you're not gonna use it?
root.Parent=workspace
root.Position=Vector3.new(0,0,0) --[[ InsertService inserts a model of what was saved inside it. Models don't have Position ]]
root.Name="Model"
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:50 PM
I have the variable in there because I wanted to try it. As for the position thing, I haven't played roblox in a while, and I am also tired. I also didn't put I am in studio.
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
31 May 2012 08:53 PM
Lol?
You can still set the model's position.
Model:MoveTo(Vector3.new(0,0,0))
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
31 May 2012 08:57 PM
Technically that isn't position. Position is where it is in the game, but you can also set it. MoveTo sets it to a certain position. I'm sure there is a way to get the position of a model. I added the position to see if I could get it to work, but it didn't..
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