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

Fail Weld script for my built sword. Help please?

Asked by 10 years ago

My sword model have about 22 Parts

I am trying to make my built sword into a Tool,however it wont stay as I want it once equipped. I am using a Weld script I got from Roblox wiki. I have already mess around with the position and rotation so I believe it could be the Weld script. Could anybody tell me what is the problem and how do I solve it?

x = script.Parent

function onEquipped()

local w1 = Instance.new("Weld")
w1.Parent = script.Parent.Handle -- This is the original Handle.
w1.Part0 = w1.Parent
w1.Part1 = script.Parent.Handle2
w1.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w2 = Instance.new("Weld")
w2.Parent = script.Parent.Handle
w2.Part0 = w1.Parent
w2.Part1 = script.Parent.Handle3
w2.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w3 = Instance.new("Weld")
w3.Parent = script.Parent.Handle
w3.Part0 = w1.Parent
w3.Part1 = script.Parent.Handle4
w3.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(1, 1, 1)

local w4 = Instance.new("Weld")
w4.Parent = script.Parent.Handle
w4.Part0 = w1.Parent
w4.Part1 = script.Parent.Handle5
w4.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w5 = Instance.new("Weld")
w5.Parent = script.Parent.Handle
w5.Part0 = w1.Parent
w5.Part1 = script.Parent.Handle6
w5.C1 = CFrame.Angles(0, 0, 0)* CFrame.new(0, 1, -1)

local w6 = Instance.new("Weld")
w6.Parent = script.Parent.Handle
w6.Part0 = w1.Parent
w6.Part1 = script.Parent.Handle7
w6.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w7 = Instance.new("Weld")
w7.Parent = script.Parent.Handle
w7.Part0 = w1.Parent
w7.Part1 = script.Parent.Handle8
w7.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w8 = Instance.new("Weld")
w8.Parent = script.Parent.Handle
w8.Part0 = w1.Parent
w8.Part1 = script.Parent.Handle9
w8.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w9 = Instance.new("Weld")
w9.Parent = script.Parent.Handle
w9.Part0 = w1.Parent
w9.Part1 = script.Parent.Handle10
w9.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w10 = Instance.new("Weld")
w10.Parent = script.Parent.Handle
w10.Part0 = w1.Parent
w10.Part1 = script.Parent.Handle11
w10.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w11 = Instance.new("Weld")
w11.Parent = script.Parent.Handle
w11.Part0 = w1.Parent
w11.Part1 = script.Parent.Handle12
w11.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w12 = Instance.new("Weld")
w12.Parent = script.Parent.Handle
w12.Part0 = w1.Parent
w12.Part1 = script.Parent.Handle13
w12.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w13 = Instance.new("Weld")
w13.Parent = script.Parent.Handle
w13.Part0 = w1.Parent
w13.Part1 = script.Parent.Handle14
w13.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w14 = Instance.new("Weld")
w14.Parent = script.Parent.Handle
w14.Part0 = w1.Parent
w14.Part1 = script.Parent.Handle15
w14.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w15 = Instance.new("Weld")
w15.Parent = script.Parent.Handle
w15.Part0 = w1.Parent
w15.Part1 = script.Parent.Handle16
w15.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w16 = Instance.new("Weld")
w16.Parent = script.Parent.Handle
w16.Part0 = w1.Parent
w16.Part1 = script.Parent.Handle17
w16.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w17 = Instance.new("Weld")
w17.Parent = script.Parent.Handle
w17.Part0 = w1.Parent
w17.Part1 = script.Parent.Handle18
w17.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w18 = Instance.new("Weld")
w18.Parent = script.Parent.Handle
w18.Part0 = w1.Parent
w18.Part1 = script.Parent.Handle19
w18.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w19 = Instance.new("Weld")
w19.Parent = script.Parent.Handle
w19.Part0 = w1.Parent
w19.Part1 = script.Parent.Handle20
w19.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w20 = Instance.new("Weld")
w20.Parent = script.Parent.Handle
w20.Part0 = w1.Parent
w20.Part1 = script.Parent.Handle21
w20.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

local w21 = Instance.new("Weld")
w21.Parent = script.Parent.Handle
w21.Part0 = w1.Parent
w21.Part1 = script.Parent.Handle22
w21.C1 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1, -1)

x.Handle.Anchored = false
x.Handle2.Anchored = false
x.Handle3.Anchored = false
x.Handle4.Anchored = false
x.Handle5.Anchored = false
x.Handle6.Anchored = false
x.Handle7.Anchored = false
x.Handle8.Anchored = false
x.Handle9.Anchored = false
x.Handle10.Anchored = false
x.Handle11.Anchored = false
x.Handle12.Anchored = false
x.Handle13.Anchored = false
x.Handle14.Anchored = false
x.Handle15.Anchored = false
x.Handle16.Anchored = false
x.Handle17.Anchored = false
x.Handle18.Anchored = false
x.Handle19.Anchored = false
x.Handle20.Anchored = false
x.Handle21.Anchored = false
x.Handle22.Anchored = false

end
script.Parent.Equipped:connect(onEquipped)

Answer this question