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

Why can't other players see my BillboardGui?

Asked by 6 years ago
Edited 6 years ago

I was using these two tutorials on the Roblox Wiki: 1 2

and I created a BillboardGui like so. I also added a LocalScript. Here is the code:

repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild('Head')

script.Parent.Adornee = game.Players.LocalPlayer.Character.Head
script.Parent.TextLabel.Text = string.reverse(game.Players.LocalPlayer.Name)

However, when I tested it out with a local server but using two people, I got [this]http://prntscr.com/jqyinj).

Why can't I see the BillboardGui above the other player's head?

0
Do you have FilteringEnabled on? secretboy6 68 — 6y
0
Nevermind, got it to work using my own Script... Zenith_Lord 93 — 6y

3 answers

Log in to vote
0
Answered by 6 years ago

Basically what is happening here is that your using a local script to insert (or whatever your doing) a billboard over YOUR character's head. because its a local script, you are the only player in that game that can see the billboard over your head. (i think)

Ad
Log in to vote
0
Answered by
Plieax 66
6 years ago
Edited 6 years ago

Put this as a normal script in workspace dude it is easier

game.Players.PlayerAdded:connect(function(plr)
    local char = plr.Character
    local head = char.Head

script.Parent.Adornee = (plr.Character.Head)
script.Parent.TextLabel.Text = string.reverse(plr.Character.Head)
end
0
Tested; doesn't work. LocalPlayer can only be used in a LocalScript, not a normal Script. Zenith_Lord 93 — 6y
0
@Zenith_Lord this should work btw Plieax 66 — 6y
Log in to vote
0
Answered by 6 years ago

So my fix was that I moved the BillboardGui to ReplicatedStorage (it was previously in PlayerGui), I removed the LocalScript, and I added the following Script:

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        wait(1)
        local head = char.Head
        local gui = game.ReplicatedStorage.BillboardGui:Clone()
        gui.Parent = workspace
        gui.Adornee = head
        gui.TextLabel.Text = plr.Name
    end)   
end)

Answer this question