Why wont this script I duplicated work when it worked before?
I made a script that opened and closed a gui every time you clicked a button, it worked. I needed the same script for a different button, so I duplicated the script and put it in a different button and made a few changes to make a different gui appear. For some reason however, the copy of the script wont work, and it gives me an error that says:
CreateTerritoryGui is not a valid member of PlayerGui "Players.Paczki_TCBC.PlayerGui"
(CreateTerritoryGui is the gui I'm trying to make appear, and Paczki_TCBC is my username.)
here is the script that did work:
02 | local button = script.Parent |
03 | local editor = button.Parent.Parent.Editor |
06 | button.MouseButton 1 Up:Connect( function () |
11 | editor.Enabled = false |
and here is the one that did not work:
02 | local button = script.Parent |
03 | local editor = button.Parent.Parent.CreateTerritoryGui |
06 | button.MouseButton 1 Up:Connect( function () |
10 | elseif choice = = 1 then |
11 | editor.Enabled = false |