Log in to vote

Can you CFrame with scripts? [closed]

Asked by 7 years ago

Hi, I wanna know how to CFrame with scripts. When you CFrame without scripts in my opinion, It isn't perfect. So how about CFraming with scripts. It'll probably be perfect. Not everything is perfect. Just like probably 80.9% will help. Designing games is all about the building and like 50% of it is CFramed. So can you CFrame with scripts?

Locked by JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

3 answers

Log in to vote
Answered by 7 years ago

Yes. You can CFrame a parts position by doing the following.

Workspace.Part.CFrame =, 0, 0)  -- XYZ

You can CFrame the rotation

CFrame.Angles(number rx, number ry, number rz) -- r means in radians
Log in to vote
Answered by
jobro13 980 Moderation Voter
7 years ago

Yes. In fact, the CFraming you probably mean uses a GUI (Graphical User Interface) - probably a plugin - to help you move parts.

In fact, this is controlled by a script.

I have the idea that you haven't got into basic scripting yet. I suggest you get into basic scripting first before going to CFrames. CFraming isn't hard, but you will need a mathematical basis for it first, otherwise you will end up in - sometimes - endless "trail and error", which is not the way how you should do it.

I'm learning basic scripting by a friend, So I might get the hang of it. Roboy5857 20 — 7y
Log in to vote
Answered by 7 years ago
Edited by JesseSong 2 months ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

Depends on what the script is. If it was a part and your trying to weld it then it would be

variable ="Weld")
variable.Part0 = --part of what you want it to be welded to
variable.Part1 = --the name of your part
variable.C0 =, 0, 0) * CFrame.fromEulerAngles(0, 0, 0) --If you want angles, but it dosent have to be just fromEulerAngles, it could be CFrame.Angles(0, 0, 0) and there is other C0's

there is C1 but that's all ive heard.