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:

1repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild('Head')
2 
3script.Parent.Adornee = game.Players.LocalPlayer.Character.Head
4script.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

1game.Players.PlayerAdded:connect(function(plr)
2    local char = plr.Character
3    local head = char.Head
4 
5script.Parent.Adornee = (plr.Character.Head)
6script.Parent.TextLabel.Text = string.reverse(plr.Character.Head)
7end
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:

01game.Players.PlayerAdded:connect(function(plr)
02    plr.CharacterAdded:connect(function(char)
03        wait(1)
04        local head = char.Head
05        local gui = game.ReplicatedStorage.BillboardGui:Clone()
06        gui.Parent = workspace
07        gui.Adornee = head
08        gui.TextLabel.Text = plr.Name
09    end)  
10end)

Answer this question