What we are trying to achieve:
Drill only working for the owner of it so the person who put it down. So we have a build script and when you put a drill(part) down a gui is supposed to pop up only forand that Billboard gui is how you start a drill.
How the Build Script Works:
When you click on the gui button it clones a part/Drill from replicated first. So it becomes a client structure. Which nobody can see then when you click again it Destroys the client structure and sends a remote event to a Server script. And inside the server script we clone the Drill/part again and put it in the same frame as the client structure.
The script has to be inside the Drill/part. Because it clones it meaning we can’t have a local script in Starter gui because how will we know which Drill/part we have to access.
Solution’s that i thought of and failed:
Billboard Gui only is seen to the local player:
When I enable the Billboard gui only for the Local player it works on the client structure. But when I place the structure on the server the local script inside the drill doesn’t work.
A player has to be a certain name to use it:
So this has to be run on the server script inside the drill because local scripts won’t run in workspace. So we have to send a remote event which works but then when another player triggers a remote event it over shadows the previous remote event making the other player the owner.
If you need me to like take any screen shots or something tell me! And Thank you!!!
That won’t work because when I clone the drill/part then put it down with the gui in it. It has to have the script in it. Because I can’t use game.Workspace. The reason for that is when you put drill/part down it will search workspace for the specific name which wont work sense people will put multiple drills down with the same name(because it clones it from replicated first). So like the script needs to know which drill it is so i have to have the script inside it.
Also the structure when I clone it in the server script it doesn’t get affected my local scripts for some reason.
Alright, so… First of all, you would wanna place the part you wanna put the gui on (duh), then make your BillboardGui inside of StarterGui, and then on the ‘BillboardGui’ instance there will be a property called ‘Adornee’. Set that to the block, and it should work. You can set it to a block using a script or by clicking the property then clicking the block. Now the gui is local, you can put scripts inside of it.