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

How To Use CFrame For BodyGyro CFrame?

Asked by 8 years ago

So I have a tool and it sends a mouse click CFrame location to a BodyGyro. How would I have the Gyro point at the CFrame I sent/

I Know that you can have the body gyro's CFrame to point at a position like this:

BodyGyro.CFrame = CFrame.new(PartPosition,TargetPosition)

Would that work with CFrame?? Plzz Help

0
By "would that work with CFrame?" I meant could you have a CFrame for the TargetPosition? Wafflecow321 457 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Don't use CFrame inside of the CFrame constructor, if that's what you're asking. You don't need to do this.

Instead, if you have CFrames instead of positions, you can use .p to get the position of the CFrame.

partCframe = part.CFrame
otherPartCFrame =  OtherPart.CFrame

BodyGyro.CFrame = CFrame.new(partCframe.p, otherPartCFrame.p)

I'm not sure if this is what a meant. Let me know.

0
Yup that worked thanks Wafflecow321 457 — 8y
Ad

Answer this question