Hi! my name is bullet, and i’ve just been having too many errors on this one line of code.
it works on the first run, but then if you get knocked down again and you jump up and the same thing happens again: this pops up.
it keeps on saying that " parent is nil " or " name is nil " even though it is literally the line of code built to help define it.
i’ve been working on a ragdoll script for context, and this is a snippet of the code that is erroring [ the part where it says if nil then return end ]
for i,v in pairs(humanoid.Parent:GetDescendants()) do
if v:IsA("BallSocketConstraint") then
v.UpperAngle = 0
v.TwistUpperAngle = 0
v.TwistLowerAngle = 0
local Joints = Instance.new("Motor6D",v.Parent)
if v.Attachment1.Parent.Name == nil or v.Attachment1.Parent == nil or v.Attachment1 == nil then -- part that errors every single time i run the code [ after one time ]
print("nil")
return end
i still just don’t get why it’s doing this
thanks for reading, and please help!