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

How do i get the perfect angles for welding?

Asked by 6 years ago

Im trying to weld a part to the uppertorso of my character

but it just ends in failure when i try to fire out the angles myself it takes too long and it still fails

i never get the precise angles i want?

0
`Part.CFrame = Torso.CFrame`? TheeDeathCaster 2368 — 6y

1 answer

Log in to vote
0
Answered by
dispeller 200 Moderation Voter
6 years ago
Edited 6 years ago

You might want to try using math.rad

You typically want your angles in radians

Here is a simple example of what I mean:

------------------------------------------------------------------------------

NonRadPart = Instance.new("Part",workspace)
NonRadPart.Anchored = true
NonRadPart.Color = Color3.new(1,0,0)
NonRadPart.Size = Vector3.new(10,1,10)

NonRadPart.CFrame = CFrame.new(0,25,0)*CFrame.Angles(90,0,0)

------------------------------------------------------------------------------

RadPart = Instance.new("Part",workspace)
RadPart .Anchored = true
RadPart .Color = Color3.new(0,1,0)
RadPart .Size = Vector3.new(10,1,10)

RadPart.CFrame = CFrame.new(0,50,0)*CFrame.Angles(math.rad(90),0,0)

------------------------------------------------------------------------------

Notice how the green brick is what you typically see as 90 degrees while the red brick is nowhere near 90 degrees.

If you check the orientation on each of the bricks, you can notice that the green RadPart brick has an orientation of 90,0,0 and the red NonRadPart brick has the orientation of 63.38, 180, 180.

Ad

Answer this question