I'm scripting an Open Options Gui, and I wanted to test making it scroll in, so I wrote this code:
local OptionsBG = script.Parent.Parent.Parent.OptionsBG function open() script.Parent.Parent.Parent.OptionsBG.Visible = true repeat wait(0.1) OptionsBG.PositionX = PositionX - 1 until OptionsBG.PositionX == 60 end script.Parent.MouseButton1Down:connect(open)
I'm just not sure how to get the specific values of the Gui. I guessed PositionX but I don't think that's right, I'm looking for this value: {0, 60 (<--THIS VALUE)}, {0, 0}
Firstly, I would recommend Tweening for positioning, Search the wiki
Secondly, GUI Positions are UDIM2's, In brackets, you position the Gui as follows:
script.Parent.Position = UDim2.new(X's Scale , X's Offset , Y's Scale, Y's Offset)