Having Billboard GUI's Visible to certain players?

I’m currently working on creating handcuffs, but i can’t get my head over how i could possibly have Billboard Gui’s visible to certain players, i.e if on a certain team.

Any thoughts on how i could achieve this, i’m using Collection Service so i’m pretty sure that would come into play somehow. Not asking for a whole code, just simply some possible gateways to research or test out!

1 Like

I think you can put the billboard gui in server storage and when a player joins a team it will clone to there starter gui with the billboard gui adorned to the prisoner.

Put it in the player gui. Set the adornee to the object you want the guii to appear.
You might want to use the local script since PlayerGui isn’t accessible to server.

Actually, you can edit the PlayerGui from the server. Its better to use the client for stuff like that, but it is technically possible.

I’ll be sure to try that out thank you!

1 Like

I made a small working version by cloning the gui from server storage to the player’s playergui:
robloxapp-20200711-1229069.wmv (1.9 MB)
I can show you the script if you want.

Awesome i’d love to see it! (30chars)

This is an extremely simple version, you should build of this:

local ServerStorage = game:GetService("ServerStorage")
local Teams = game:GetService("Teams")
local PoliceTeam = Teams:WaitForChild("Police")
local PrisonersTeam = Teams:WaitForChild("Prisoner")
local Gui = ServerStorage:WaitForChild("BillboardGui")
local PlayerTeam = "Neutral"

game.Workspace.PrisonerPart.ClickDetector.MouseClick:Connect(function(player)
	if PlayerTeam == "Neutral" then
		game.Players[player.Name].Team = PrisonersTeam
		PlayerTeam = "Prisoner"
	elseif PlayerTeam == "Police" then
		local CopGui = player.PlayerGui.BillboardGui:Destroy()
		if CopGui then
			CopGui:Destroy()
		end
	end
end)

game.Workspace.CopPart.ClickDetector.MouseClick:Connect(function(player)
	game.Players[player.Name].Team = PoliceTeam
	local GuiClone = Gui:Clone()
	GuiClone.Parent = player.PlayerGui
	PlayerTeam = "Police"
end)

And that’s just an idea, i’m sure you can come up with a better system.

3 Likes

Thank you! This really helps me a get a standpoint, i’m going to attempt to use this with CollectionService so when you are such and such studs Keybind Images show. Cheers for the help!

1 Like