Help with locker script

i will send a pic, of how it is now


i put all gui’s off, and even if they’re turned on i can only click on the locker which is ofc annoying :sob:

and it won’t open- as u see on the screen (i have 2 doors because i did one for open position and other close!)

Make a Folder instance, and put the locker inside it, and then change the lockers variable to reference it.

it’s in the folder(the locker is in the folder) and yeah-

crap- i didn’t meant to click on the solution :sob:

Did you define the lockers variable in both scripts?

busy, and no- i am trying and it’s my first time doing an reference- :sob:

It just means that you have to do local lockers= (the folder you created) and then the variable is refering to that folder

oh- lemme check you had it already in the scripts i suppose-

it’s defined oop :sob: i need to make more games fr

the only problem is this- and the gui is won’t pop up still-

It wouldn’t open anyways because the script stops reading in line 6 anyways because it errors, it says you’re trying to index will with GetChildren() so you did something and it doesn’t recognize the folder, check that everything is correct with it’s name , and maybe even do WaitForChild(Folder name)

1 Like

okay i will do it, lmk for any other suggests

the only issue is


the GetChildren() is nil- so idk what else to replace there-

attempt to index nil with 'GetChildren' means you tried to use the method on nothing, it needs to be called in an instance, paste the reference to the folder, because the problem is with that folder

welp- local lockersFolder = workspace:WaitForChild(“LockersFolder”) like this?? (i am js guessing since i need to learn lua more)

Do you also get a warning? (yellow/orange text)

no only the red one 18:49:06.404 High school Locker @ 10 Dec 2023 18:49 auto-recovery file was created - Studio
18:49:08.216 ServerScriptService.Script:29: attempt to index nil with ‘OnServerEvent’ - Server - Script:29
18:49:08.216 Stack Begin - Studio
18:49:08.216 Script ‘ServerScriptService.Script’, Line 29 - Studio - Script:29
18:49:08.216 Stack End - Studio
18:49:11.868 Players.Acespacesss.PlayerGui.ScreenGui.LocalScript:8: attempt to call missing method ‘GetChildren’ of table - Client - LocalScript:8
18:49:11.869 Stack Begin - Studio
18:49:11.869 Script ‘Players.Acespacesss.PlayerGui.ScreenGui.LocalScript’, Line 8 - Studio - LocalScript:8
18:49:11.869 Stack End - Studio
18:50:07.987 Disconnect from ::ffff:127.0.0.1|53295 - Studio
18:53:36.382 High school Locker auto-recovery file was created - Studio i did kinda edit the code