Do local scripts work in surface GUIs? I am creating a button that I only want to change something on the client, when they click the button it will make something appear in the surface GUI but cannot find a way to do it with a local script. Any ideas?
1 Like
Surface GUIs work with local scripts when the Surface GUI is in StarterGui with its Adornee set to the specific part. However, when Surface GUIs are in the workspace, parented to the part, then you have to use server scripts.
4 Likes
Local scripts work only in:
- The Replicated First service.
- A player’s Player Gui.
- A player’s Character Model.
- A players Backpack, such as a Tool.
- A player’s Player Scripts.
As long as your local script is in one of the items in the list above, it will work.
As said here, if you simply set the Adornee of the SurfaceGui to its respected part, you can certainly use a local script.
10 Likes