A little weary of trying this on Studio, would this work?
local n = script.Parent if n.Position == UDim2.new(0,28,0.0) then n.Position = UDim2.new(0,-272,0,0) --The original Position end --If a frame hits a certain position, then it should automatically revert to the original position the frame was set to.
Yes it will work but you it will looks something like this:
local n = script.Parent n.Position.Changed:connect(function() -- To trigger the function if n.Position == UDim2.new(0,28,0.0) then n.Position = UDim2.new(0,-272,0,0) end end)