Attempt to index nil with 'Parent'

Hi Developers, my script is not working, does anybody know why? It gives me the same error code regardless of how many parents I add. I’m quite new to adding parents rather than using the model/part name.

Does anybody know why? I’ve looked it up on google and the results that came up do not help. I’m sure this can’t be too difficult.

script:

game.Parent.Parent.Parent.Parents.Parent.Lights1.bzzsoundidk.Sound.Looped = true

game.Parent.Parent.Parent.Parent.Parent.Lights1.bzzsoundidk.Sound:Play()

1 Like

Try

script.Parent.Sound.Looped = true
script.Parent.Sound:Play()
1 Like

I’m so stupid, thank you so much. You helped me alot, I’ve definitely learned now, hey, you learn from your mistakes!! I know I have. Have a good day!! :slight_smile:

1 Like

Would you know how to change this? I’ve tried this too, but it gives me loads of errors.


I want it to a Parent so I don’t need to rename the directory every time I clone my tycoon.

Thank you!

https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events

Something with :PivotTo into the script. I recently had problems with this too

Are you sure that’s correct? I just want anything rather than the tycoon name so I don’t need to keep renaming it when i clone them.

Uhmmm… Well, I don’t understand what try to say