Created
May 15, 2017 02:11
-
-
Save spotco/523fe43e1ef597078ca4dde0b371ecc3 to your computer and use it in GitHub Desktop.
RemoveUIOffset.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local selection_part = game.Selection:Get()[1] | |
| function r_itr(cur) | |
| pcall(function() | |
| local position = cur.Position | |
| local size = cur.Size | |
| if typeof(size) ~= "UDim2" or typeof(position) ~= "UDim2" then | |
| return | |
| end | |
| cur.Position = UDim2.new(math.abs(position.X.Scale),0,math.abs(position.Y.Scale),0) | |
| cur.Size = UDim2.new(math.abs(size.X.Scale),0,math.abs(size.Y.Scale),0) | |
| end) | |
| for _,child in pairs(cur:GetChildren()) do | |
| r_itr(child) | |
| end | |
| end | |
| r_itr(selection_part:GetChildren()[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment