So I have a script inside a model in Replicated Storage that welds the all of the parts together. The script works perfectly fine, but it's in Replicated Storage so it won't run, right? The wiki says that the script runs when it is moved into any service that it can run it, but it's not doing that. It's moving the parts but the weld script isn't welding the parts together. Help?!
--\\ Services
local JointsService = game:GetService('JointsService')
--\\ Variables
local Model = script.Parent
local WeldPart = Model.PrimaryPart
function Weld()
local function WeldParts(Part, handle)
Part.Anchored = false
local weld = Instance.new("Weld")
weld.Part0 = handle
weld.Part1 = Part
weld.C0 = handle.CFrame:inverse()
weld.C1 = Part.CFrame:inverse()
weld.Parent = JointsService
end
for _,obj in pairs (Model:GetChildren()) do
if obj:IsA ("BasePart") or obj:IsA ("UnionOperation") then
WeldParts (obj, WeldPart)
end
end
end
Weld()
wait (1)
script:Destroy()

3 comments
This is a server script? What service are you moving the script to? Is the script parented under a model?
The script is in a model, Yes its a server script, and i'm moving it into a model inside Workspace.
Never mind i fixed it, I did a repeat loop that waited until it the model was a descendant of Workspace.