Button brings you to section in Scrolling GUI

And all I have to do is put it inside a LocalScript in the button?

1 Like

Yeah, check when the button is clicked and move it accordingly.

1 Like

Within Test mode open your explorer tab and find the scrollingframe. Then open properties panel and when you scroll to the position you want it to snap to copy and paste the value. So you can type it in later.

GuiObject.MouseButton1Down:Connect(function()
ScrollingFrame.CanvasPositon = Vector2.new(0,DesignedPosition) 
end)
1 Like

My scrolling frame is called Passes, so would I change it to passes?

1 Like

You don’t need to change any names you just need to add in this line of code

ScrollingFrame.CanvasPositon = Vector2.new(0,DesignedPosition) 

To each button after you find the desired position for each

1 Like


I just get that error.

	ScrollingFrame.CanvasPositon = Vector2.new(0,300) 
end)
1 Like

It was example code. Don’t your buttons already work?

You need to define your buttons first

1 Like

Yes, but I am trying to do the Buttons on the side which bring you do that position in the ScrollingFrame

1 Like

Assuming your local script is a child of the button.

script.Parent.Activated:Connect(function()
   scrollingFrame.CanvasPosition = Vector2.new(--location)
end)

of course the scrollingFrame would be where your scrollingframe is.

1 Like

Didnt really understand what you meant there.

Still kind of lost by what you mean here.

Are your buttons already made? defined like have a variable and a MouseButton1Down event connected?

1 Like

I believe he has buttons, but not scripted.

1 Like

Whats the name of the ScreenGui this is located in?

1 Like

1 Like
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local Main_PC = PlayerGui:WaitForChild("Main_PC")
local Robux_Shop = Main_PC:WaitForChild("Robux Shop")
local Roblox_ShopFrame = Robux_Shop.Frame
local Left_Buttons = Roblox_ShopFrame["LeftButtons"]

local Passes = Roblox_ShopFrame.Passes

--// Buttons
local Gamepasses = Left_Buttons.GamePasses
--// There are Two other "Gems" Button so couldn't make those

Gamepasses.MouseButton1Down:Connect(function()
Passes.CanvasPositon = Vector2.new(0,300)  --I assume Passes is the Scrolling frame
end)

I went the extra mile cause I don’t like having multiple scripts doing the same thing tends to get messy

1 Like

The other two Gem buttons are just a filler, gonna change the third one later once I have an idea haha

1 Like


I am getting this error?

1 Like

Oh was a typo aswell
I also updated the code

1 Like

I put this inside a localscript in the gamepass button right? Also you put Roblox_Shop not Robux_Shop

This should work no matter where* you put it within the player.

1 Like

So where would I put the localscript?

1 Like