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

How do I rotate a brick to a certain position?((two questions

Asked by
Kitorari 266 Moderation Voter
7 years ago

How do I rotate a brick to rotation 90.015, 0.003, -172.066?

And also, is there a way to add to a cframe's position instead of putting the exacts coords?

((Sorry there's no code, I don't know how to do this.)

1 answer

Log in to vote
0
Answered by
AZDev 590 Moderation Voter
7 years ago

I'm not exactly sure what you want to do.

You can set the parts rotation like this.

local Part = workspace.Part

Part.CFrame = Part.CFrame * CFrame.Angles(math.rad(90.015), math.rad(0.003), math.rad(-172.066))

You can add to a cframe like this.

local Part = workspace.Part

Part.CFrame = Part.CFrame + Vector3.new(0, 1, 0)

This will simply take the block and move it up 1 stud.

0
I'm guessing this is what you want to do. Hopefully this helps. If it does please accept my answer. AZDev 590 — 7y
Ad

Answer this question