-
What do you want to achieve?
Weld parts together using a script. -
What is the issue?
The welds don’t work. I believe their property “Active” should be set totrue
, but it’s not. -
What solutions have you tried so far?
I’ve searched many posts but none of them seemed to fix my problem and all of them were using code just like I am using. Perhaps the problem could be that I’m “exporting” those parts from a ViewPort Frame to workspace?
Here’s my code:
function weld(p0, p1)
local w = Instance.new("Weld")
w.Parent = p0
w.Part0 = p0
w.Part1 = p1
w.C1 = (p0.CFrame+p0.PositionAttachment.CFrame.Position)*p1.CFrame
return w
end