weld = Instance.new("ManualWeld", a)
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
return weld
end
sight= game.Lighting.attachemets["reflex sight"]:Clone()
sight.Parent=primarytool
player.Character:FindFirstChild(primarytool)
sight:MoveTo(primarytool.sightpart.Position)--+Vector3.new(0,1,0))
local function weldBetween(a, b)
sight.PrimaryPart.Rotation=primarytool.sightpart.Rotation
local weld = weldBetween(primarytool.Handle, sight.PrimaryPart)
primarytool.Unequipped:connect(function()
sight:Destroy()
end)
This does not work. Its supposed to clone a reflex sight from lighting, and position it onto the sightpart and weld it there. I have no idea what im doing wrong as it should work/
|