Roblox set primary part cframe. 2 rotate the part 45 degrees around its y axis. It includes essential arithmetic operations for working with 3d data on roblox. Note this function will throw an error if no modelprimarypart exists for the model. 15 things you never noticed in fortnite duration.
In this tutorial i show you how to move a model using primary part which you can use this to move many parts inside a model. Cframe short for coordinate frame is a data type that describes a 3d position and orientation. For example the following lines produce different cframes. All other parts in the model will also be moved and will maintain their orientation and offset respective to the modelprimarypart.
Make a smooth moving modelpartunit roblox studio duration. 1 slide the part 5 units on x. Sets the basepartcframe of the model s modelprimarypart. How to script a moving part roblox scripting tutorial duration.
Classes enums data types lua. A canonical method of creating a cframe at a certain position and euler rotation xyz. To demonstrate setprimarypartcframe a simple loop is then run which switches the model between two cframes every second. Part2parent model set the primary part modelprimarypart part1 modelparent gameworkspace while true do local primarypartcframe.
The primarypart of this model is then set meaning modelsetprimarypartcframe can then be used. Which will be equal to nil if there is no primary part.