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

How To Use CFrame For BodyGyro CFrame?

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

1 comment

0

By "would that work with CFrame?" I meant could you have a CFrame for the TargetPosition?

1 answer

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.

1 comment

0

Yup that worked thanks

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