How to make Billbourd Gui local to a player

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 problems:
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!!!

Put it in StarterGui :slight_smile: , using Adoorne.

I already made a tutorial kinda.

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.

But thank you!! :slight_smile:

You could use a :FireClient()
to call things. over RemoteFunctions/RemoteEvents

Those could get over shadowed if there are 2 people in the server placing drills. Sense there are 2 poeple sending remote events.

Why don’t you try and centralise your scripts instead? Instead of having a script in each drill have one script for all the drills.

You could attempt be accomplish this through OOP. If you make drill an instance you can easily reference the drill that you want

Also, I am not sure why can’t you just use a Remote event? Can’t you just fire the event from the server and pass the player that you want it to be shown to?

Oh wait a minute I just over complicated things my bad :') you can just pass the drill you want through the remote event.

Alright thank you! So ima try to centralise my script but idk how that will turn out.

Also about the remote event based on what you said you whant me to send a remote evnet to the drill I whant. But when there are 2 people triggering the remote event it will break!

I fee like I miss understood on the remote event. If I did sry for that but yeah ima try to centrlize my scripts but I have a feeling it wont work lol. Thank you!

1 Like

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.

Thank you! I didint know what Adrornee is so when the person mentioned it the first I was kinda confused. But does that part like have to be in workspace or Adornee doesent work?

Than you!!!

Pretty sure it can be anywhere, not just workspace. You should probably test that out.

So the problome is the fact that the build script clones and the drill and thats were Adrornee breaks

You can try updating the Adornee to the block. Something like this:

local partThatNeedsBillboard = game.Workspace.SomePart
local PlayerGui = game.LocalPlayer.PlayerGui
PlayerGui.RandomBillboardGui.Adornee = partThatNeedsBillboard

Yeah but the parts constenly move sense I clone then make the parent workspace so there are multiple parts called some name. So it has to be script.Parent!

Srorry ver bad at explining.

So the part you want to set adornee to is script.Parent?

I’m not quite sure I understand. :<