You can achieve this in multiple ways. You can go about it by using a whitelist, tables or simply disabling the GUI by getting the player’s name or UserId.
Here’s a very basic way:
local player = game.Players.LocalPlayer
local gui = destination to billboard gui -- Wherever your gui is located
if player.Name = "55167233gf" then
gui.Enabled = false
However, an exploiter can easily see this, so you can alternatively do it on the server.
game.Players.PlayerAdded:Connect(function(player)
if player.Name = "55167233gf" then
game.Players:WaitForChild(player).PlayerGui.Gui.Enabled = false
Alternatively by using a for loop.
for i,v in pairs(game:GetService("Players"):GetPlayers() do
if v.Name = 55167233gf or v.UserId = 'insert your UserId here'
v:WaitForChild("PlayerGui").Gui.Enabled = false
This should do it
Server Script in ServerScriptService with your BillBoardGUI as the child of the script
local GUI = script["Your GUI name here"]
game.Players.PlayerAdded:Connect(function(plr)
wait(3)
GUI:Clone().Parent = plr.Character.Head
end)
Local Script in StarterGui
wait(5) -- Let the character load in and the BillBoardGui get it's parent changed
local GUI = script.Parent.Parent.Character.Head.BillboardGui
if GUI.Parent.Parent.Name == script.Parent.Parent.Name then
GUI.Enabled = false
end
The way i tested it was by using the Test thing in studio and doing a local server with 2 players