v3c3
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 674 |
|
|
| 05 Jun 2015 09:54 PM |
Getting billboardgui to show up on everyones heads for everyone to see? Here's my code. game.Players.PlayerAdded:connect(function(player) for _, Player in pairs(game.Players:GetPlayers()) do repeat wait() until player.Character and player.Character:findFirstChild("Head") gui.Parent = player.PlayerGui text.Parent = gui gui.Size = UDim2.new(5,0,5,0) text.Size = UDim2.new(1.5,0,.3,0) text.Position = UDim2.new(-0.25, 0,-0.15, 0) gui.StudsOffset = Vector3.new(0, 0, 0) text.BackgroundTransparency = 1 text.TextScaled = true text.Font = "Legacy" text.TextColor3 = Color3.new(255, 255, 255) text.TextStrokeColor3 = Color3.new(0, 0, 0) text.TextStrokeTransparency = 0 text.BorderSizePixel = 3 text.Text = "rap" -- change to what their rap actually is repeat wait() until player.Character and player.Character:findFirstChild("Head") gui.Adornee = player.Character.Head end end)
When testing it with multiple characters, only one character gets a gui and then the others dont. |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2015 09:59 PM |
I don't see any referent for "gui" or "text".
If they have referents, there's likely other relevant info that you haven't posted here.
Try telling us everything you're doing. |
|
|
| Report Abuse |
|
|
v3c3
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 674 |
|
|
| 05 Jun 2015 10:02 PM |
| facepalm, you literally figured it out for me. Thanks bb |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2015 10:06 PM |
I can tell by the context, though, that the same gui is getting parented to each player's PlayerGui, and ending up in the last one only.
You need to clone it for each player.
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2015 10:20 PM |
What about after the character dies?
player.CharacterAdded:connect(function() blah blah end)
for that matter, this is not something the server needs to be doing anyway.
just put the instance in StarterGui and tell it to make the Text and Adornee what to be when the Character's Head arrives.
Then, it'll happen automatically every time. |
|
|
| Report Abuse |
|
|