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:
1 | repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild( 'Head' ) |
2 |
3 | script.Parent.Adornee = game.Players.LocalPlayer.Character.Head |
4 | 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?
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)
Put this as a normal script in workspace dude it is easier
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | local char = plr.Character |
3 | local head = char.Head |
4 |
5 | script.Parent.Adornee = (plr.Character.Head) |
6 | script.Parent.TextLabel.Text = string.reverse(plr.Character.Head) |
7 | end |
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:
01 | game.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 ) |
10 | end ) |