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

BodyGyros changing Angles of a block

Asked by 10 years ago

Is there a way to use BodyGyros or AngularVelocityto change the rotation of a block trying to face a Vector3 location. I know little of BodyObjects.

1 answer

Log in to vote
0
Answered by
User#2 0
10 years ago

This is actually a CFrame question, believe it or not!

To get a CFrame to face a Vector, there's a special way to do that:

CFrame.new(Vector3Point, Vector3Facing)

What that does is create a CFrame with a position of Vector3Point and it has the CFrame face Vector3Facing.

To apply this to a BodyGyro, just set the BodyGyro's cframe property to a CFrame you want it to face towards!

0
How would I set it to the position of a block, I am having issues, like, it is disappearing issues. FromLegoUniverse 264 — 10y
0
Set the position of the CFrame to Vector3.new(0, 0, 0) and it should work. User#2 0 — 10y
Ad

Answer this question