[Resolved] How Fix, attempt to index nil with 'Position'

2 Likes

Attempt to index nil means there property you are attempting to get doesn’t exist, are you sure the Start, Middle and Finish have the Position properties?

Yes they have it I really tried everything

Is the start and finish instance a model or a part?

1 Like

The start and the finish are parts

1 Like

Could you try doing

print("Start: ".. Start.Position.. " Middle: ".. Middle.Position.. " Finish: ".. Finish.Position)

and put that before the local updated = quad(…) and see if it prints that without errors?

1 Like

I have no print that apart from the error

So you pasted that print command above line 33 and there was nothing in the output other than the error?

So if you don’t get those numbers printed out then the script isn’t reaching that line of code.
You have to find out why.

In your Fireworks script, before line 64, try printing those variables the same way @rutelf said in their post.

Yes I have nothing but the error

try this print("Start: ", Start.Position, " Middle: ", Middle.Position, " Finish: ", Finish.Position)

or
tostring the vector3

up to you

1 Like

can you show me line 34 on the firework client again with the print statement?

Apparently the FireworksModule isn’t running at all then.

I’m not familiar with Modules, but if a variable is nil then you aren’t setting it to anything.

Did you put the print above like 36?

Start, Middle, or Finish is nil, add some print statements before the FireAllClients in the modulescript to determine what’s nil.