Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why can't other players see my BillboardGui?

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?

2 comments

0

Do you have FilteringEnabled on?

0

Nevermind, got it to work using my own Script...

3 answers

✓ Accepted answer

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

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

2 comments

0

Tested; doesn't work. LocalPlayer can only be used in a LocalScript, not a normal Script.

0

@Zenith_Lord this should work btw

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.