hello! ive been trying to figure out an xbox supported shop for sometime now, and im stuck on one thing, let me explain. my shop is named "ShopGui" for starters, i have 4 tabs, trails (TrailsFrame), and i have a line ('Line') under the tab, i want the line to move to a different tab once the R1 button was pressed and make ('PetsFrame') visible, how would i do that?
function onetotwo()
userInputService.InputBegan:connect(function(input, processed)
if input.KeyCode == Enum.KeyCode.ButtonR1 then
line:TweenPosition(UDim2.new(0,150,0,0))
trailsframe.Visible = false
petsframe.Visible = true
end
end)
end
Thats what i have so far, but wont work why?

2 comments
function onetotwo() userInputService.InputBegan:connect(function(input, processed) if input.KeyCode == Enum.KeyCode.ButtonR1 then line:TweenPosition(UDim2.new(0,150,0,0)) trailsframe.Visible = false petsframe.Visible = true end end) end thats what i have so far, but wont work, why?
Rap your code in code blocks which are "~" so we can read your question.