Issue with Variables

I am trying to use a viewport to have an item rotating around, I am using a module script, the UI loads fine, and the value is set to the name of the item in Replicated Storage, but it always gives me this error.


(this is the mainmodule setting the value of the stringvalue to the correct thing)

This is the script I am getting the error with.

Any help would be greatly appreciated

ngl, idk whats going on here. please describe it better.

The error already stated what’s the issue, “Item1 is not a valid member of PlayerGui ‘…’”.

It said on line 7 I’m guessing this is the script that caused the error, you need to make sure that you are accessing the right instance name.

1 Like

Your error means that there is no instance named “Item1” parented to something you’re trying to use .Item1 on.

This is happening on line 7 of the second script.

Make sure you have the correct number of .Parent’s and that you’re getting the instance you want there. It seems you’re getting the PlayerGui with the 6th .Parent, which shouldn’t ever have a scrolling frame in it (scrolling frames should be under ScreenGuis generally).

image

Thats the way its laid out in my explorer

1 Like

I’ve double checked that its the right amount of parents, I am just trying to get the model from the previews folder in replicated storage. The name of the item is the Item one value

1 Like

However, its still giving me the same error

when you play the game, what does it look like under your playergui?

don’t use script.parent.parent in a chain like that, it’s not efficient, just call it from starter/playergui.