Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How would you make a BillboardGui visible to team only? I cannot figure it out.

Asked by 6 months ago
Edited by incapaxx 6 months ago
game.Players.PlayerAdded:Connect(function(Plr)
    Plr.CharacterAdded:Connect(function(chr)
        local tp = game.Teams["Test Team"]:GetChildren()
        local tp2 = game.Teams["Test Team 2"]:GetChildren() 
        if Plr.TeamColor == BrickColor.new("Black") then
            local BBG = script.Black:Clone()

            BBG.Parent = chr.Head
            for i = 1, #tp2 do
                while true do
                    wait()      
                    BBG.PlayerToHideNameFrom = tp[i]
                end
            end
        end
        if Plr.TeamColor == BrickColor.new("White") then
            local WBG = script.White:Clone()
            WBG.Parent = chr.Head

            for i = 1, #tp do   
                while true do
                    wait()  
                    WBG.PlayerToHideNameFrom = tp[i]
                end 
            end
        end
    end)    
end)

This for some reason will not work and will show both guis.


Edit: Tab your code correctly!!!!!
0
Hide the GUI individually on each client rather than the server. cowboyemote 1076 — 6mo
0
Why do you have a while true loop after cloning each the GUI? Rheines 600 — 6mo

Answer this question