Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Using BodyAngularVelocity to have part face direction of another brick?

Hello,

So I was wondering if someone would be explain to me how I would go about using BodyAngularVelocity to have a brick face another bricks direction?

Thanks

1 comment

0

Did you consider using Body Gyro? It has an end CFrame goal as opposed BodyAngularVelocity which, in your case, will apply Velocity for a period of time in order to reach that goal.

1 answer

First, instead of using a BodyAngularVelocity, you should use a BodyGyro. A BodyGyro makes a part point at a location, instead of making it spin in a direction.

Put the BodyGyro inside the part you want to rotate, and make a script inside the BodyGyro with this code:

brick =  game.Workspace.Part --insert part you want it to face towards here

script.Parent.CFrame = CFrame.new(script.Parent.Parent.Position, brick.Position)

1 comment

0

@f000X It does not seem to be working and there is no output.

This discussion is preserved as it was. New answers, comments, and votes are closed.