And all I have to do is put it inside a LocalScript in the button?
Yeah, check when the button is clicked and move it accordingly.
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)
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
It was example code. Don’t your buttons already work?
You need to define your buttons first
Yes, but I am trying to do the Buttons on the side which bring you do that position in the ScrollingFrame
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.
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?
I believe he has buttons, but not scripted.
Whats the name of the ScreenGui this is located in?
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
The other two Gem buttons are just a filler, gonna change the third one later once I have an idea haha
Oh was a typo aswell
I also updated the code
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.
So where would I put the localscript?