Created
May 4, 2017 05:59
-
-
Save spotco/dac468b06d676c4edd8161a411326c4c to your computer and use it in GitHub Desktop.
surfacegui_to_decal.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] | |
| local decals = {} | |
| for _,child in pairs(selection_part:GetChildren()) do | |
| if child.ClassName == "SurfaceGui" then | |
| table.insert(decals, child) | |
| end | |
| end | |
| for i=1,#decals do | |
| local itr = decals[i] | |
| local decal = Instance.new("Decal",selection_part) | |
| decal.Texture = itr.ImageLabel.Image | |
| decal.Face = itr.Face | |
| end | |
| for i=1,#decals do | |
| decals[i]:Destroy() | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment