Hi SH,
I've made and scripted an AWP for a game I have in mind, but on usage, (mind you, it's fully welded) I see some parts are missing, and they're scattered around the baseplate. I don't know if it's a failure of my Weld Script, or anything.
This is my weld script:
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 == "Part" 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()
I don't know what I'm doing wrong. Help?
This has been solved. I installed Ozzypig's welding plugin and it did the job just fine, now I have CFramed weapons.
Use solid modeling now, rather than using hundreds of parts. Your players will appreciate the lag reduction.
Locked by Perci1, Tkdriverx, Redbullusa, EzraNehemiah_TF2, and adark
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?