Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a GUI go on a part, only visible to one person?

Asked by
Mystdar 352 Moderation Voter
9 years ago

How would I make a GUI go on a part, only visible to one person? The part is visible to every person but the GUI only visible to one player?

How would I do the parenting?

Would it be like this?

Player = game.Players.LocalPlayer
Part = game.Workspace.Part

a = Instance.new("BillBoardGUI", Player.PlayerGui)
a.Adornee = Part

Is there a way to do it without BillBoard GUIs and with frames? Thanks

1
Haven't you just answered your own question? If you wish to show a SurfaceGui or BillboardGui to a specific person only, simply parent the GUI to their PlayerGui, instead of parenting it to Workspace. DataStore 530 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

Use a Local Part. These parts are only visible to ONE PERSON. You use a Local Script to make one. There are 2 ways to make one.

  1. Camera --------This lasts forever until you delete it with a script.
  2. Message --------This only is visible to one person but deletes when they die or reset
--Message
local bin = Instance.new("Message", game.Players.LocalPlayer.Character)
bin.Name = "Bin"
local part = Instance.new("Part")
part.Parent = bin

--Camera

local part = Instance.new("Part", game.Workspace.Camera)

Now all you have to do is add the gui to it with your script and you're done!


There is another feature you can do to HIDE the gui from other players but this is probably the best way to do it.

Ad

Answer this question