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

How to rotate a welded part?

Asked by 4 years ago
    local HORN  = script.Horn:Clone()
    HORN.Parent = workspace
    HORN.Orientation = Vector3.new(-50.33, -87.83, 0)
    local hornWeld = Instance.new("Weld")
    hornWeld.Parent = workspace
    hornWeld.Part0 = c.Head
    hornWeld.Part1 = HORN
    hornWeld.C0 = CFrame.new(.08,.6,.6)        

The weld works correctly but the horn isn't rotated as i want it to be like, how do you rotate the horn even tough it's in a weld?

0
CFrame * CFrame.Angles() DeceptiveCaster 3761 — 4y

1 answer

Log in to vote
1
Answered by
IDKBlox 349 Moderation Voter
4 years ago

CFrame.Angles() is what you're going to want.

When you're setting the hornWeld.C0 add * CFrame.Angles() and set x,y,z values to what you'd like

hornWeld.C0 = CFrame.new(.08,.6,.6) * CFrame.Angles(0,math.rad(90),0)
Ad

Answer this question