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

Is there an easier way to do CFramed welds?

Asked by 9 years ago

So I'm working on this project where I apply cframed welds to accomplish things such as welding a player's arms so that they grip the weapon, the problem is, i make changes, have to press play solo, and then make more changes. It is taking a lot of time, I was wondering if there was an easier way to do it, or even record the CFrame I want. I have a piece of example code below.

--This code is from inside the function called when the tool is equipped
--RArm is the localplayer's right arm
--Character is the localplayer's character in workspace
--HumRootPart is the HumanoidRootPart of Character
--Should I use CFrame.fromEulerAnglesXYZ or CFrame.Angles? Difference?

local RArmWeld = Instance.new("Weld")
RArmWeld.Parent = Character
RArmWeld.Part0 = RArm
RArmWeld.Part1 = HumRootPart
RArmWeld.C0 = CFrame.new(-0.75, -0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
1
CFrame.Agnles is the same as CFrame.fromEulerAnglesXYZ, just shorter to type out. What you can do is hit play solo and edit the welds in the command bar.. then when you get what you like copy and paste it into the code. If that's what you're asking. Goulstem 8144 — 9y
0
Thanks! dragonkeeper467 453 — 9y
0
I did edit the welds but they did not change once in play solo mode... dragonkeeper467 453 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

You could make your changes in a test server, and then keep your script changes.

Play solo Test Make Changes Double-Toggle the script's disabled property Test Repeat as needed Exit Play Solo Mode

0
ok, but goulstem answered my ques already, thanks anyways! dragonkeeper467 453 — 9y
Ad

Answer this question