Folder is not a valid member of tool

This is really wierd I have a folder named config inside a tool whith a bool value and when I print it it does print the value but when I try to “if then” the value I get an error :“Config is not a valid member of tool”

why is this happening?

print(item.Config.GemItem.Value)
if item.Config.GemItem.Value == true then
				
			
        --do stuff
					
end

1

did you first try and wait for it, like :WaitForChild() if that doesn’t work then we’ll know it never spawns in, which would solve one piece of puzzle
EDIT: so it prints true from that script, could you give us some more info, I didn’t see the image, it was still loading for me

2 Likes

Could you show the explorer to give us a better idea of config and the parent locations?

Thanks

1 Like

Is there any code between these two lines you might have omitted? Also, are there any simultaneous action that may affect the tool?

image

there is more to that script for sure, can you send the whole script with no exceptions?

Can you show the whole explorer, like where the parent of tool is, where the script you are making is, etc. show everything

1 Like

Just tried that and it worked! I dont know why it has to wait since its always there but it works

1 Like

When the script runs, the object may not have replicated to the client. This is a similar situation to using StreamingEnabled, when the client cannot see objects that have not loaded in their chunk.