How to give each Client its own SurfaceGUI

Hello, I am attempting to develop a system where each player that joins, has their own SurfaceGUI, which they can control various aspects from it. I am trying doing this by having the model in ReplicatedStorage, and using a LocalScript to clone it into the workspace. And then having the LocalScripts in StarterPlayerScripts to control the GUIs. Because I want to multiple players in one game.

This process is very tedious, and difficult, especially for somebody like me that hasn’t had a ton of experience on Server side vs Client side scripts. Also, incase anybody is wondering, I’m using Surface GUI just because when its put on a part, it behaves how I want it to behave, just staying in the same spot, and pointing the same direction. If theres a way to do this will BillboardGUIs or something like that, please tell me.

So if theres anyway to do any part of this process easier, then that would be very helpful!

I bet the experienced scripters looking at this are gonna think im so dumb lol

2 Likes

SurfaceGUI in StarterGui then set the Adornee to said part at runtime via Localscript

StarterPlayerScripts to control the GUIs

Why not do it under the SurfaceGUI, you’re guaranteed to have the UI elements ready & it’s easier

1 Like

Because, if I’m correct, LocalScript’s do not work in the workspace. But would a regular script work in the workspace, inside the cloned model? In other words, could I just replace the LocalScript with a normal script, then just have that inside the cloned model?

If you want each player to have their own UI, you can’t be using regular Scripts. Put the SurfaceGUIs in StarterGui and use local scripts to control them. You could put them in StarterPlayerScripts if you want, but as @pixe_ated said it’s easier to just put the local scripts in the UIs themselves.

Only thing you’ll have to do differently is set the GUI’s adornee to the part
Hope this helps