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 » Scripters
Home Search
 

Re: Instance.new with a model?

Previous Thread :: Next Thread 
xsuttreex is not online. xsuttreex
Joined: 07 Sep 2009
Total Posts: 97
25 Mar 2015 08:33 PM
Is it possible to use "Instance.new" with a model, because that's the only way I can think of making maps appear and stuff. By the way, I'm kind of just starting scripting and I felt like learning some miscellaneous stuff.
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
25 Mar 2015 08:34 PM
ill say for pay
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
25 Mar 2015 08:35 PM
Get out, fish.

model = Instance.new("Model")
Report Abuse
xsuttreex is not online. xsuttreex
Joined: 07 Sep 2009
Total Posts: 97
25 Mar 2015 08:37 PM
lol thanks :D
Report Abuse
xsuttreex is not online. xsuttreex
Joined: 07 Sep 2009
Total Posts: 97
25 Mar 2015 08:39 PM
but wait how do you choose what model you want to be inserted?
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
25 Mar 2015 08:43 PM
You mean a free model? The owner of the game in the script must own that model (take the model).

id=0 --Model's asset id
model=game:GetService("InsertService"):LoadAsset(id):GetChildren()[1]
Report Abuse
xsuttreex is not online. xsuttreex
Joined: 07 Sep 2009
Total Posts: 97
25 Mar 2015 08:46 PM
I would ask for you to explain that more clearly, but I feel like I can learn about that later and it would be better to start with simpler stuff, but still, thanks! :D
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
25 Mar 2015 09:34 PM
Store your maps in ServerStorage.

Lets say one is called 'Map1'.

A viable way of making it appear, is by doing the following in a script:

local mapClone = game.ServerStorage.Map1:Clone()
mapClone.Parent = game.Workspace
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
25 Mar 2015 10:11 PM
@fish
Greedy idiot, get out.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
25 Mar 2015 10:13 PM
Alright if you do game.InsertService:LoadAsset(id) it will load the asset with the given ID, an asset can be a model.

But since I don't see InsertService in the explorer you use game:GetService("InsertService"):LoadAsset(id)

Okay now this will insert the service into nil and its grouped (meaning its a model)
local OurAsset = game:GetService("InsertService"):LoadAsset(id)
for i,v in pairs(OurAsset:GetChildren()) do
v.Parent = game.Workspace
end

Hope it makes sence for you :)
Report Abuse
xsuttreex is not online. xsuttreex
Joined: 07 Sep 2009
Total Posts: 97
26 Mar 2015 10:36 PM
@loli, thanks, but kind of hard to understand but @amanda's thing was helpful and i'm not saying yours isn't, it's just confusing for me.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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