I am trying to make my custom shop area where you use cameras to get around the lobby and when I try to click on the shop button it goes to the shop but the back button does not come up!!! can you help me?
shop client script
local btn = script.Parent
btn.MouseButton1Click:Connect(function()
btn.Visible = false
btn.Parent.Title.Visible = false
btn.Parent.PlayGui.Visible = false
btn.FindFirstChild.Parent.ReturnShopBtn.Visible = true
end)
btn.Parent:FindFirstChild("ReturnShopBtn").MouseButton1Click:Connect(function()
btn.Visible = true
btn.Parent.Title.Visible = true
btn.Parent.PlayGui.Visible = true
btn.FindFirstChild.Parent.ReturnShopBtn.Visible = true
end)
the camera script
local camera = workspace.CurrentCamera
local mainMenuMap = workspace:WaitForChild("MainMenuMap")
local tweenService = game:GetService("TweenService")
local btn = script.Parent
function tweenCamera(pos,tweenTime)
tweenService:Create(camera, TweenInfo.new(tweenTime,Enum.EasingStyle.Linear),{CFrame = pos.CFrame}):Play()
end
btn.MouseButton1Click:Connect(function()
btn.Visible = false
btn.Parent.Title.Visible = false
btn.Parent.Shop.Visible = false
tweenCamera(mainMenuMap.CamPart3,1)
wait(1)
print("reached Destnation")
end)
P.s test this code out in studio make a text button on screengui
