I know why, but I don't know how I can fix, I guess it's impossible

image

Read Title.

You will understand when you read the coding, there is enough information

PLS READ ALL CODES

3 Likes

Isn’t the thing called “Swordpiece2_”? You are just calling Swordpiece2.

Edit: If that isn’t it, I suggest seeing how many times you added .Parent because maybe it isn’t defined correctly.

1 Like

If the object you’re trying to define isSwordpiece2__, you can just define it as script.Parent

:weary: :man_facepalming:

are you read all codes ?
pls read all codes

I already made an edit to my response.

I don’t understand how you can say we’ll understand the code, when you can’t understand it yourself.

3 Likes

I have to explain this codes because you don’t read the coding correctly

local three = script.Parent.Parent**:FindFirstChild(“Swordpiece2”)**
white two and three do
script.Parent:SetPrimaryPartCFrame(script.Parent.Parent.Swordpiece2.PrimaryPart.CFrame)
end

this line → script.Parent:SetPrimaryPartCFrame(script.Parent.Parent.Swordpiece2.PrimaryPart.CFrame)
have error

Then just use three.PrimaryPart.CFrame

On the first line, maybe try changing it to script.Parent.Name = “Swordpiece2_”. Define it as a variable later.

You forgot the first line…

I tried but studio give error

but okay I try now again

nope, I didnt forget the first line
and FIRST LINE IS don’t important, because problem is not this

what does part storage in workspace look like?

Didn’t worked
because if cant find “Swordpiece2” child, it get nil, so → nil.PrimaryPart
then studio give error

but the while loop shouldn’t run if that’s the case

1 Like

Hasn’t anyone read the whole coding ?


line 4 get error
image
but if Swordpiece2_ is not a valid member of Part, three is getting false if three if false →

while true and false do → while false do

are you understand ?

Yeah I’ve been trying to say that since

Do:

while two and three == not nil do

Sorry, it’s hard for me to understand grammatically incorrect sentences.

if three is nil, its false

nil = false :confused:

you can try:
if not nil then print(“test”) end