Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Torso is not a valid member of Model "Workspace.janlariplanet.net"?

Asked by 1 year ago

local p=script.Parent:GetChildren() for i=1,#p do if p[i].className=="Part" then

local weld = Instance.new("Weld") 
    weld.Name="Hold"
weld.Part0 = p[i]
weld.Part1 = script.Parent.Parent.Torso

local HitPos = p[i].Position + (p[i].CFrame.lookVector * .5) 

local CJ = CFrame.new(HitPos) 
local C0 = p[i].CFrame:inverse() *CJ 
local C1 = script.Parent.Parent.Torso.CFrame:inverse() * CJ 

weld.C0 = C0 
weld.C1 = C1 

weld.Parent = p[i]

end end

Answer this question