Script not detecting parts in Workspace

Hi.
Im creating a script, as such:
image

However, I am getting this error:
image

Even though, barriers is clearly in the workspace:
image

Why is it doing this?

1 Like

The error is ‘bbariers’, whereas your model is named ‘barriers’ with one B
Saw the edit. Try using :WaitForChild()?

2 Likes

You made a typo on line 11. Added an extra b

1 Like

sorry, that was an older error message.
here is the new one:
image

I have copied and pasted the same name, so that I am sure that they are the same, and the error still comes up.

1 Like

No worries.

Try adding a :WaitForChild() or :FindFirstChild(), does it still return nil/infinite yield? Also, is your seat unanchored and the CanCollide property is set to false?

image

e.e

1 Like

How about the CanCollide/anchored thing? It could be falling through the world if there’s no weld.

oh my goodness. yes, lol.
How did I not think of that.

I forgot to anchor them XD

Thank u.

1 Like

It shouldn’t be a problem if they aren’t anchored, just ensure either CanCollide is true OR Anchored is true.