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 rotation along a fixed part?

local firebrick = game.workspace.WaitForChild("firepart")
local pivot = game.workspace.WaitForChild("pivotbrick")

local pivotposition = pivot.Position

while true do
	firebrick.CFrame = CFrame.new(pivotposition) * CFrame.Angles(0, math.rad(i), 0) * CFrame.new(-42.5,0,0)
	wait()
end

Here is what I have tried for rotating a part via CFrame.

1 comment

0

weld them?

1 answer

Pre-made CFrames include the rotation automatically.

Get the CFrame of “pivot” and set “firepart” ‘s CFrame as that.

This should copy the exactly position and rotation of “pivot” ‘s

4 comments

0

Could you elaborate on how to get them?

0

I did, just set firepart’s CFrame to pivot’s CFrame. You can get their CFrame the same way you get their position, for example: local pivot_CFrame = pivot.CFrame

0

Okay, thank you.

0

Be sure to accept this answer if this is the solution!

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