RBX.lua.Motor (Object): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>XLEGOx
No edit summary
>Outofspace
m Cat. added
Line 14: Line 14:
a.C1 = CFrame.new(Vector3)*CFrame.fromEulerAnglesXYZ(Vector3)
a.C1 = CFrame.new(Vector3)*CFrame.fromEulerAnglesXYZ(Vector3)
</pre>
</pre>
[[Category:ROBLOX Lua Objects]]

Revision as of 00:36, 30 June 2008

(Incorrect description)A motor is a type of hinge, but motors work like, well, motors. They can be set to do different things by adjusting the properties on the object that has the motor on it. There are several different ways to make it spin, and you can adjust how fast it spins too. Motors can be extremely helpful too. -- WRONG KIND OF MOTOR.

The motor mentioned here is the OBJECT motor. Its whats used to animate characters, xLEGOx's Personoids, Zuka's dragons, and many other creations in roblox. They just make Part1 move to [DesiredAngle] relative to Part0. TheC0 sets how the rotation point is attached to the Part0, and the C1 sets how the Part1 is attached to the rotation point

Basic usage

To use Instance motors you must use a script. Basic template for making a motor:

local a = Instance.new("Motor")
a.Parent = Obj1
a.Part0 = Obj1
a.Part1 = Obj2
a.C0 = CFrame.new(Vector3)*CFrame.fromEulerAnglesXYZ(Vector3)
a.C1 = CFrame.new(Vector3)*CFrame.fromEulerAnglesXYZ(Vector3)