UIPageLayout Help

I keep coming across this error : Object passed to UIPageLayout JumpTo is not part of the layout

local UiPageLayout = game.StarterGui.Store.Holder.Store.Frames.UIPageLayout

local player = game.Players.LocalPlayer

local GFrame = player.PlayerGui.Store.Holder.Store.Frames.GamepassFrame
local HFrame = player.PlayerGui.Store.Holder.Store.Frames.HalosFrame
local PFrame = player.PlayerGui.Store.Holder.Store.Frames.PowerUpsFrame

local Gbtn = player.PlayerGui.Store.Holder.Store.SideBar.GamepassBtn
local Hbtn = player.PlayerGui.Store.Holder.Store.SideBar.HalosBtn
local Pbtn = player.PlayerGui.Store.Holder.Store.SideBar.PowerUpsBtn

Gbtn.MouseButton1Click:Connect(function()
	print("omg")
	local currentPage = UiPageLayout.CurrentPage
	
	if currentPage ~= GFrame then
		UiPageLayout:JumpTo(GFrame)
	end
end)

Hbtn.MouseButton1Click:Connect(function()
	print("omg")
	local currentPage = UiPageLayout.CurrentPage
	
	if currentPage ~= HFrame then
		UiPageLayout:JumpTo(HFrame)
	end
end)

Pbtn.MouseButton1Click:Connect(function()
	print("omg")
	local currentPage = UiPageLayout.CurrentPage
	
	if currentPage ~= PFrame then
		UiPageLayout:JumpTo(PFrame)
	end
end)
2 Likes