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

Creating CFrame using Position and orientation?

I am trying to create a cframe with a position and orientation to set a model.Not sure how to combine them two.

local SideOne = Vector3.new(0,0,0)
		local OldPos = Cube.MainCube.Position
		Cube.MainCube.Orientation = SideOne
		Cube:SetPrimaryPartCFrame(CFrame.new( ))--CFrame would go here

1 comment

0

you could use an array to store the cframes using cframe:components() and then change and set them with what you need.

1 answer

✓ Accepted answer

You can create a CFrame as you are and set the orientation using CFrame.Angles() like so:

CFrame.new(0,0,0) * CFrame.Angles(0,0,0)

When using this however you must bare in mind that CFrame.Angles() works in radians and therefore any degree values you have must be converted using math.rad()

1 comment

0

Oh so thats why it never works out how i want it. Thanks

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