local script cannot find mailbox although mailbox does exist?
I am trying to make a special way to transfer data between scripts! like a postal service.
the problem is 2 local scripts are having the same error, they can't find a folder named mailbox.
both scripts and folder are in playergui. so I added a screen gui! to test if that would fix it. surprisingly the 2 local scripts could not find the screen gui I added!
script 1
error on line 5
02 | local GLI = script.Parent.graphical_load_indicator |
03 | local black = script.Parent.black_screen |
04 | local random = Random.new() |
05 | local local_mail_box = script.Parent.Parent.mail_box |
06 | local new_mail_ 1 = Instance.new( "StringValue" , local_mail_box) |
07 | local new_mail_ 2 = Instance.new( "StringValue" , local_mail_box) |
11 | print ( "gradient is invisble" ) |
15 | wait(math.random( 1 , 10 )) |
17 | new_mail_ 2. Name = "GLI_DG_max_dec" |
18 | new_mail_ 2. Value = "1" |
19 | new_mail_ 2. Name = "GLI_DG_min_dec" |
20 | new_mail_ 2. Value = "0" |
24 | print (black.Transparency) |
26 | until black.Transparency = = 1 |
27 | print ( "gradient is visible" ) |
30 | wait(math.random( 1 , 40 )) |
script 2
error on line 2
02 | local mail_box = script.Parent.Parent.mail_box |
03 | local mail = mail_box:GetChildren() |
04 | local mail_man = script |
07 | function delivery(mail) |
10 | mail.Parent = mail_man |
20 | mail_box.ChildAdded:Connect(delivery) |
they both get this specific message:
mail_box is not a valid member of PlayerGui "Players.jeremqpmfpi.PlayerGui" - Client