Motor6d part1 still nil

my motor6d part1 is still nil when i set it to uppertorso

function bb(character)
local object = script.thing:Clone()
local base = object.Base
local uppertorso = character.UpperTorso
local motor6d = Instance.new('motor6d', uppertorso)
motor6d.C1 = 'my c1'
motor6d.C0 = 'my c0'
motor6d.Part1 = uppertorso
motor6d.Part0 = base
end

It could be taht UpperTorso is not yet loaded, maybe try

function bb(character)
local object = script.thing:Clone()
local base = object.Base
local uppertorso = character:WaitForChild("UpperTorso")
local motor6d = Instance.new('motor6d', uppertorso)
motor6d.C1 = 'my c1'
motor6d.C0 = 'my c0'
motor6d.Part1 = uppertorso
motor6d.Part0 = base
end

still dont work, i used player.CharacterAdded

Try setting the parent at the end.

Also make sure that C0 and C1 is valid.

still not working… the part1 still nil

Assuming that this is a server script, is object.Base’s parent workspace? Are you using actual CFrame values for C0 and C1 or is it like this in the script?

nevermind both code worked at this time, i dont know why