|
|
Line 1: |
Line 1: |
| {{CatUp | Tutorials}} | | {{CatUp | Tutorials}} |
| ==First Off==
| | The first step to updating your model is to open up studio and select the model you want to replace it with. |
| This will not work if you don't wish to have your model published. You can either create a simple script or apply it into this. Now create a blank model, a blank script in the model, and IntValue in this model called "Version", change the value to "2". Publish this as a model. Now create a new script and dont bother about the other model. Create another IntValue called "Version", put it in this new script. Make the value "1"
| |
|
| |
|
| ==Creating the script==
| | Now go to studio menu and click file > Publish selected to roblox... |
| {{Example|<pre>
| |
| CurrentVersion = script.Version.Value
| |
| ScriptName = "Script" -- Name of the script in the published model
| |
| Location = game.Workspace -- Location of where this script is.
| |
| ModelID = 0000 -- Change this to the model id of the model you created earlier
| |
|
| |
|
| function CheckUpdate() -- You can either put this in a loop, or call it once. I reccomend calling it once.
| | [[Image:Capture.PNG]] |
| InsertService = game:GetService("InsertService")
| |
| Model = InsertService:LoadAsset(ModelID) -- This is where the model being public comes in.
| |
| Version = Model.Version.Value
| |
| if CurrentVersion < Version then
| |
| Model[ScriptName]:clone().Parent = Location
| |
| end
| |
| end
| |
|
| |
|
| --Now you can add your script anywhere else here
| | Click the button "Update" |
|
| |
|
| </pre>}}
| | [[Image:Models.PNG]] |
| | |
| Now just copy this scripts contents and paste it into the Model's script. Now just update the model and leave this in your place. It should work. If not, or there are errors, use the discussion.
| |
| | |
| ==See also==
| |
| [[InsertService]] | |
|
| |
|
| | Click the select button for the model you want to update and you should be done! Your model is now updated. |
| [[Category: Scripting Tutorials]] | | [[Category: Scripting Tutorials]] |
Revision as of 22:45, 9 July 2011
The first step to updating your model is to open up studio and select the model you want to replace it with.
Now go to studio menu and click file > Publish selected to roblox...
Click the button "Update"
Click the select button for the model you want to update and you should be done! Your model is now updated.