I am working on a rpg and the weld script I use for the swords works fine in studio, but in playing the game for some reason the weld doesnt work. theres no output V my weld script
handle = script.Parent:WaitForChild("Handle") tool = script.Parent function weld(part) local w1 = Instance.new("Weld") w1.Part0 = handle w1.Part1 = part w1.C0 = handle.CFrame:inverse() w1.C1 = part.CFrame:inverse() w1.Parent = tool end for _, part in pairs (script.Parent:GetChildren()) do if part:IsA("BasePart") and part.Name ~= "Handle"then weld(part) end end
the model the script is in is in a folder in lighting if that matters