UIPageLayout not working properly

So, i have a car game that has a dealership (ofc), but i have a problem with my UIPageLayout inside the DealershipFrame (only for console)

function module:AddCar(IdData)
	local Frame = templetes.Car_View_Templete:Clone()
	Frame.Name = IdData[2]
	Frame.CarImage.Image = IdData[1]
	Frame.Price.Value = IdData[3][3]

	Frame.Parent = dealershipFrame.Cars.ScrollingFrame
	Frame.Visible = true
	Frame.InfoFrame.MainFrame.NameLabel.Text = IdData[2]

	Frame.InfoFrame.MainFrame.View.MouseButton1Click:Connect(function()
		if dealershipFrame.Cars:FindFirstChildOfClass("Frame") then return end

		local Clone = templetes.Car_Templete:Clone()
		Clone.Name = IdData[2]
		Clone.Parent = dealershipFrame.Cars
		Clone.LayoutOrder = 1
		Clone.Visible = true

		local UPL: UIPageLayout = dealershipFrame.Cars.UIPageLayout
		UPL:JumpToIndex(1)

		Clone.CarImage.Image = IdData[1]
		Clone.InfoFrame.MainFrame.NameLabel.Text = IdData[2]

		for infoName, infoValue in IdData[3] do
			local clone = Clone.InfoFrame.MainFrame.NameLabel:Clone()
			clone.Parent = Clone.InfoFrame.MainFrame
			clone.Name = "InfoLabel"

			clone.Text = infoName..": "..infoValue
		end

		Clone.Buttons.MainFrame.Purchase.MouseButton1Click:Connect(function()
			game.ReplicatedStorage.Server_Events.PurchaseTriggered:FireServer(IdData[2])
			UPL:JumpToIndex(0)
			task.wait(0.5)
			Clone:Destroy()
		end)

		Clone.Buttons.MainFrame.GoBack.MouseButton1Click:Connect(function()
			UPL:JumpToIndex(0)
			task.wait(1)
			Clone:Destroy()
		end)
	end)
end

so here is my code, and i tested on multiple controllers (not consoles), and all have the same result

sorry for portrait video

just boosting this topic

Try replacing MouseButton1Click with Activated. You’ll need to do this for all of them for it to work correctly though

Edit: @1_JoDev I wrote what I wrote above because I saw the video and I though the issue was the buttons weren’t registering. How do you have your UIPageLayout configured?

all scroll types are not enabled just that, and padding 50 x-offset

Edit: but i have the exact same module (different connections and frames) for the inventory, but the inventory one works fine?

If the module works when used in your inventory then the issue might be happening with how your new Gui is configured like you correctly suggested

If your new Gui has a ScrollingFrame they can sometimes interfere with UIPageLayouts as an example

i thought that too, but i couldn’t find the problem, i did try printing when it goes back, and connected the UIPageLayout.Stopped event, it kept printing stopping on ScrollingFrame for the dealership

1 Like

It seems as though the issue might be related to this bug:

i had so many issues with UIPageLayout in the past look at my topics, il consider using a custom made one, and maybe create a open-source model, thanks for the help though. Activated event didn’t work, and i also feel they are the same

1 Like

I made the Activated suggestion because I erroneously thought that your issue was the buttons weren’t registering gamepad input, but then I realised what you meant

I did research on topics made recently on this forum about this and it does seem like UIPageLayouts experience many issues when dealing with gamepad input unfortunately, here’s another example of a problem a different player had when using them:

ClipsDescandents is on in all frames, and the scrollingframe i made, anyways thank you for the response, im going to make it custom

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.