I want to clone a room which is local (can only be seen by the players) and there are some welding scripts inside them (normal scripts), but since global scripts doesn't work inside anything that is local, how do you weld them together? Here's my illustration game: THE GAME
Most of the things in the room aren't welded properly because of the global scripts inside them.
So how do you fix it?
Simple welding script that works for me 100% of the time:
function Stick(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") or A.ClassName == "UnionOperation" then Stick(script.Parent.Handle, A) A.Anchored = false else local C = A:GetChildren() for i=1, #C do Get(C[i]) end end end
Try it out.