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

I dont know what cframe value i should edit to make the tool face correctly?

Asked by 7 years ago
Edited 7 years ago

May seem dumb, but I needed a script to weld together a bunch of unions in a tool, a friend recommended

function Weld(x,y)
    local W = Instance.new("Weld")
    W.Part0 = x
    W.Part1 = y
    local CJ = CFrame.new(x.Position)
    local C0 = x.CFrame:inverse()*CJ
    local C1 = y.CFrame:inverse()*CJ
    W.C0 = C0
    W.C1 = C1
    W.Parent = x
end

function Get(A)
    if A.className == "UnionOperation" then
        Weld(script.Parent.Handle, A)
        A.Anchored = false
    else
        local C = A:GetChildren()
        for i=1, #C do
        Get(C[i])
        end
    end
end

function Finale()
    Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()

But when I test, it welds everything together perfectly, It is angled the wrong way,

local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ

I tried editting that to get it to angle correctly, it angles straight up, but if the y axis went to the front by 90 degrees, it would be fine

1
The tool itself is angled the wrong way? Or the parts are in the correct position and rotated wrong? Sorry for the confusion Bellyrium 310 — 7y
0
you need to rotate part x abnotaddable 920 — 7y
0
So Every single part is angled the wrong way, It is all angled straight up, parallel to the player body, I want it to be straight, parallel with the arm iPrepared 30 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Do find a cframe location of something all u do is run the game, then move ur roblox Character to the deriction you want the cframe to be then while the game is runnning goto workspace select the model with ur name then goto the Head Part and under which is the property u'll see a section called location and that will be the loaction

0
hope it works User#20467 0 — 7y
Ad

Answer this question