Good Evening / Morning,
I’ve been working on a main menu that script that does a few things. I’ve run into an error that when trying to transition to my Character edit menu it doesn’t recognize the GUI that is supposed to display all the character information.
Here is the script that is ran when the button is clicked
-- Create Out Tween for Main Side bar --
local tweenBarOut = TweenService:Create(script.Parent.Parent,
TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Position = UDim2.new(-1.125, 0,0.5, 0)})
local tweenCharIn = TweenService:Create(Player.PlayerGui.characterGUI,
TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0), {Position = UDim2.new(-1.125, 0,0.5, 0)})
local function onButtonActivated()
tweenBarOut:Play()
print("Moving GUI")
tweenBarOut.Completed:Wait()
print("Moved")
transBG()
Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CamPartChar.CFrame
transBG()
tweenCharIn()
end
script.Parent.Activated:Connect(onButtonActivated)
Whenever I launch the game I get the error “characterGUI is not a valid member of PlayerGui”
Any help would be much appreciated!