So as the title says it How to work with the latest version of Module3D with the new tool AdornScreenGuiToWorld? I understand a bit of the Example Code but not fully understand. Has anyone figure it out?
Here's the whole section of where CloneTrooper introduce it. I don't know how to set it up to be able to work with it though...
* Module3d:AdornScreenGuiToWorld(Instance screenGui, number screenStudWidth = 1) Description: * This function takes a ScreenGui, and turns it into a SurfaceGui. * The SurfaceGui is adorned to a part whose width and height is fitted to fit the screen perfectly, * The part follows the camera like an adorned 3D Model, but it uses a certain depth Arguments: * Instance screenGui - guiObj must be a ScreenGui. If you only need to do this with one frame, its reccomended you just make the entire ScreenGui an adorn. * number screenStudWidth = 1 - The width of the adornee part. This can be used to specify how far away the adornee should be from the camera. - This argument is optional, and excluding it will just make the part's width 1. Returns: * Instance SurfaceGui - This is the SurfaceGui version of your ScreenGui. * 3dGuiModifier - This is a small with a few functions. It allows you to change the width of the part, and reset it back to a ScreenGui. * 3dController:SetScreenStudWidth(boolean active) - Toggles whether or not the 3D Object should be shown or not * 3dGuiModifier:Reset() - Returns the ScreenGui to its former state, Destroys the adornee, Destroys the SurfaceGui, and disconnects the movement event. Example Code:
local handler = require(script.Parent.Module3D) local oldGui = script.Parent local newGui,modifier = handler:AdornScreenGuiToWorld(screenGui,3) print(oldGui.Parent,newGui.Parent) wait(1) modifier:SetAdorneeStudWidth(2) wait(1) modifier:End() print(oldGui.Parent,newGui.Parent)