I've been trying for about 30 minutes just to solve this simple problems. The problem is in the Inventory Code section because before, it worked without it. This is the code that I have been using:
----------Title Screen Code----------
wait (0.5)
local TitleScreen = game.Players.LocalPlayer.PlayerGui:WaitForChild("TitleGui")
local TitleFrame = TitleScreen:WaitForChild("TitleFrame")
local TitleButton = TitleFrame:WaitForChild("PlayButton")
local TitleText = TitleFrame:WaitForChild("TitleText")
TitleScreen.Enabled = true
game.Players.playerAdded:connect(function(player)
TitleScreen.Enabled = true
end)
TitleButton.MouseButton1Down:connect(function(player)
TitleScreen.Enabled = false
end)
----------Shop Code----------
local ShopScreen = game.Players.LocalPlayer.PlayerGui:WaitForChild("ShopGui")
local ShopFrame = ShopScreen:WaitForChild("ShopFrame")
local ShopButton = ShopScreen:WaitForChild("ShopButton")
local ShopScrollFrame = ShopFrame:WaitForChild("ShopScrollFrame")
local ShopBack = ShopFrame:WaitForChild("BackButton")
ShopScreen.Enabled = false
ShopFrame.Visible = false
ShopButton.Visible = true
ShopScrollFrame.Visible = false
ShopBack.Visible = false
while TitleScreen.Enabled == true do
wait()
end
if TitleScreen.Enabled == false then
ShopScreen.Enabled = true
end
ShopButton.MouseButton1Down:connect(function(player)
ShopButton.Visible = false
ShopFrame.Visible = true
ShopScrollFrame.Visible = true
ShopBack.Visible = true
end)
ShopBack.MouseButton1Down:connect(function(player)
ShopButton.Visible = true
ShopFrame.Visible = false
ShopScrollFrame.Visible = false
ShopBack.Visible = false
end)
-----------Inventory Code----------
local InvScreen = game.Players.LocalPlayer.PlayerGui:WaitForChild("InventoryGui")
local InvFrame = InvScreen:WaitForChild("InvFrame")
local InvButton = InvScreen:WaitForChild("InvButton")
local InvScrollFrame = InvFrame:WaitForChild("InvScrollFrame")
local InvBack = InvFrame:WaitForChild("BackButton")
InvScreen.Enabled = false
InvFrame.Visible = false
InvButton.Visible = true
InvScrollFrame.Visible = false
InvBack.Visible = false
while TitleScreen.Enabled == true do
wait()
end
if TitleScreen.Enabled == false then
InvScreen.Enabled = true
end
if ShopFrame.Visible == false then
InvScreen.Enabled = true
end
while InvFrame.Visible == true do
ShopScreen.Enabled = false
wait()
end
while ShopFrame.Visible == true do
InvScreen.Enabled = false
wait()
end
if InvFrame.Visible == false then
ShopScreen.Enabled = true
end
InvButton.MouseButton1Down:connect(function(player)
InvButton.Visible = false
InvFrame.Visible = true
InvScrollFrame.Visible = true
InvBack.Visible = true
end)
InvBack.MouseButton1Down:connect(function(player)
InvButton.Visible = true
InvFrame.Visible = false
InvScrollFrame.Visible = false
InvBack.Visible = false
end)
It also doesn't say anything in the output. Thanks for the help!

1 comment
Thanks!