generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: String

Previous Thread :: Next Thread 
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
11 Jan 2014 11:06 AM
function onPlayerEntered(Player)
head = Player.Character.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.TextLabel.Text = Player.Name.."" -- Text wont work How do I work this
gui.Enabled = true
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jan 2014 11:07 AM
function onPlayerEntered(Player)
repeat wait() until Player.Character
head = Player.Character.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.TextLabel.Text = Player.Name
gui.Enabled = true
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
11 Jan 2014 11:08 AM
@OP,
1) When the "PlayerAdded" event is fired, the character isn't loaded yet, so this would error.
2) If they reset, they would lose the GUI. Use it with the "CharacterAdded" event.
3) Assuming it's a BillboardGui, you need to set the Adornee property to the part you want it adorned to, so in your case the head.

http://wiki.roblox.com/index.php/Adornee
Report Abuse
SymbolumSicarius is not online. SymbolumSicarius
Joined: 23 Jun 2009
Total Posts: 2899
11 Jan 2014 11:09 AM
y repeat wait till character
just let it register the character itself



game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(steve)
head = steve.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.TextLabel.Text = p.Name
gui.Enabled = true
end)
end)
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
11 Jan 2014 11:10 AM
Doesn't work
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jan 2014 11:14 AM
game.Players.PlayerAdded:connect(function(p)
repeat wait() until p.Character
head = steve.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.TextLabel.Text = p.Name
gui.Enabled = true
p.CharacterAdded:connect(function(steve)
head = steve.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.TextLabel.Text = p.Name
gui.Enabled = true
end)
end)

Try that.
Report Abuse
SymbolumSicarius is not online. SymbolumSicarius
Joined: 23 Jun 2009
Total Posts: 2899
11 Jan 2014 11:16 AM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(steve)
head = steve.Head
gui = script.Gui:Clone()
gui.Parent = head
gui.Adornee = head
gui.TextLabel.Text = p.Name
gui.Enabled = true
end)
end)
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jan 2014 11:28 AM
y u repeat post ^
Report Abuse
SymbolumSicarius is not online. SymbolumSicarius
Joined: 23 Jun 2009
Total Posts: 2899
11 Jan 2014 12:39 PM
"gui.Adornee = head"
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image