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: Player Entered Script (Only 7 Lines) Doesn't work

Previous Thread :: Next Thread 
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 01:55 PM
This should work, should it not?

game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.lighting.Name:clone().Parent = player.PlayerGUI
player.PlayerGUI.Name.Text = ""..p.Name..""
game.lighting.Picture:clone().Parent = player.PlayerGUI
player.PlayerGUI.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
28 Aug 2011 01:57 PM
I think game.lighting.Name gives you the Lighting's Name, instead of the object called Name.
game.lighting:findFirstChild("Name")
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 01:58 PM
Thanks, but should Picture still work?
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
28 Aug 2011 01:58 PM
Picture is no property of Lighting, so it should be ok.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:01 PM
changed it, still not working
Report Abuse
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
28 Aug 2011 02:02 PM
game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.lighting.Name:clone().Parent = p.PlayerGUI
player.PlayerGUI.Name.Text = ""..p.Name..""
game.lighting.Picture:clone().Parent = p.PlayerGUI
player.PlayerGUI.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)
Player wasnt Defined.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:03 PM
i'll try that, thanks
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:06 PM
Nope, still not working.
Just to make sure, it would look like this now...

--I changed "Name" to "Username"
game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.lighting.Username:clone().Parent = p.PlayerGUI
player.PlayerGUI.Username.Text = ""..p.Name..""
game.lighting.Picture:clone().Parent = p.PlayerGUI
player.PlayerGUI.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:07 PM
You still have one 'player'.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:07 PM
oh...two, actually
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:08 PM
Yeah, I was going to repost saying two, but I didn't want to wait for the floodcheck. Lol.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:10 PM
Still not working...

game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.lighting.Username:clone().Parent = p.PlayerGUI
p.PlayerGUI.Username.Text = ""..p.Name..""
game.lighting.Picture:clone().Parent = p.PlayerGUI
p.PlayerGUI.Picutre.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)

BTW, I copied the GUIs in lighting to StarterGUI and they work just fine, so it's not those.
Report Abuse
bloob827 is not online. bloob827
Joined: 01 Aug 2010
Total Posts: 6867
28 Aug 2011 02:11 PM
game.Lighting
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:11 PM
You mispelled 'Picture' on the second to last line.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:12 PM
Ok, I'll change it to Lighting
And even if Picture was spelt wrong, teh text should still have worked
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:13 PM
Tried 'em both...nothing...

game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.Lighting.Username:clone().Parent = p.PlayerGUI
p.PlayerGUI.Username.Text = ""..p.Name..""
game.Lighting.Picture:clone().Parent = p.PlayerGUI
p.PlayerGUI.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:14 PM
Note the post above my last post. :P
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:14 PM
It's 'PlayerGui' not 'PlayerGUI'
Report Abuse
bloob827 is not online. bloob827
Joined: 01 Aug 2010
Total Posts: 6867
28 Aug 2011 02:14 PM
p.PlayerGUI should be p.PlayerGui

same with other one
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:16 PM
Still-not-work-ing

game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.Lighting.Username:clone().Parent = p.PlayerGui
p.PlayerGui.Username.Text = ""..p.Name..""
game.Lighting.Picture:clone().Parent = p.PlayerGui
p.PlayerGui.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:19 PM
Erm...bump?
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
28 Aug 2011 02:22 PM
Are you testing in Test Server or Test Mode? Also, it's possible it runs before PlayerGui is created.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
28 Aug 2011 02:23 PM
I'm uploading it to a game every time I edit, and shut down the old game beforehand.
If it runs before it's created, should I just make it wait for 10 seconds and see if that helps?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
28 Aug 2011 02:24 PM
Try to play your place... :D
Report Abuse
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
28 Aug 2011 02:26 PM
game.Players.PlayerAdded:connect(function(p)
wait(0.2)
game.Lighting.Username:clone().Parent = p.PlayerGui
p.PlayerGui.Username.Text = ""..p.Name..""
game.Lighting.Picture:clone().Parent = p.PlayerGui
p.PlayerGui.Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end)

game.Players.PlayerAdded:connect(function(p)
repeat wait(1) until p
if p then
gui = Instance.new("ScreenGui",p)
pic = Instance.new("ImageLabel",gui)
pic.Image = http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..p.Name..""
end end
Try that.
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