Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what is rotvelocity and velocity?

Asked by 3 years ago

so acctually its my question what rotvelocity and velocity is ? this is the only thing what i dont know xd

1 answer

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
3 years ago
  • RotVelocity has been replaced with AssemblyAngularVelocity.
  • Velocity has been replaced with AssemblyLinearVelocity.

Both of these represent speed of a part in a Vector3 value. AssemblyLinearVelocity means current part speed while AssemblyAngularVelocity means current part rotation speed. Say when a part is moving and you want to know it's speed, you would run this

local Part = workspace.Part

local Speed = Part.AssemblyLinearVelocity
local RotationSpeed = Part.AssemblyAngularVelocity

This would return it's moving speed and it's rotation speed. This property can be edited, if you set part's linear velocity to 0, 0, 10, you will see it will move to one direction and then it will stop, that is the Roblox physics.

The thing is that if part is Anchored, if you change it's velocity, it will stay the same and won't change because physics won't do anything with it, this is especially good for conveyors, take a look at this video for example. You see the conveyor part is anchored and has linear velocity of 0, 0, 10, that is why when you put unanchored part onto it, it slides right because technically the conveyor is supposed to be moving 10 studs fast however, it's anchored so it can't, that however does not stop physics for the other part.

Ad

Answer this question