Insert (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
added
 
>Emess
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{|
<onlyinclude>{{Method|name = Insert
|<onlyinclude>{{Method|name = Insert
|arguments = [[Model]] '''model'''
|arguments = [[Model]] '''model'''
|returns = [[nil]]
|returns = [[nil]]
|description = Inserts model into [[Workspace]] (Same as ''model''.Parent = game.Workspace).
|description = Inserts model into [[Workspace]] (Same as ''model''.Parent = game.Workspace).
|object = [[InsertService]]
|object = InsertService
|}}</onlyinclude>
}}</onlyinclude>
|}
{{clear floats}}
{{Example|<pre>
{{Example|<pre>
local model = game:GetService("InsertService"):LoadAsset(assetId)
local model = game:GetService("InsertService"):LoadAsset(assetId)
Line 17: Line 16:
*[[LoadAsset_(Function)|LoadAsset]]
*[[LoadAsset_(Function)|LoadAsset]]
*[[IsA_(Function)|IsA]]
*[[IsA_(Function)|IsA]]
[[Category:Methods]]

Latest revision as of 02:17, 30 December 2010

Insert( Model model )
Returns nil
Description: Inserts model into Workspace (Same as model.Parent = game.Workspace).
Member of: InsertService
Example
local model = game:GetService("InsertService"):LoadAsset(assetId)
if(model:IsA("Model")) then
  local tab = game:GetService("InsertService"):Insert(model) 
end


See Also