Local script in GUI won't affect other GUI's

In my local script, whenever the “customize button” is clicked, it changes the cameras CFrame and focus to a different part, this part of the script works however the lines of code ( 18 - 22 ) where it is supposed to alter other GUIs appearance acts as if it were skipped.


I have some sort of prior knowledge that a script inside a GUI can not alter any other GUI’s, but even if I put the script in the main GUI and alter it to work, it still skips that line of code.
Any help would be much appreciated.

local Player = game:GetService("Players").LocalPlayer

local MainMenu = Player.PlayerGui:WaitForChild("MainMenu")