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 » Scripters
Home Search
 

Re: will this work?

Previous Thread :: Next Thread 
ninjabeast0117 is not online. ninjabeast0117
Joined: 19 Dec 2011
Total Posts: 489
13 Jul 2016 08:30 PM

function PlayerAdded(p)
local sgui = game.StarterGui
sgui.ScreenGui.Player1.Text = p.Name
sgui.ScreenGui.Player2.Text = "Waiting..."
if sgui.ScreenGui.Player1.Text == p.Name then
sgui.ScreenGui.Player1.Text = p.Name
else
sgui.ScreenGui.Player2.Text = p.Name


end
end

game.Players.PlayerAdded:connect(PlayerAdded)
Report Abuse
ninjabeast0117 is not online. ninjabeast0117
Joined: 19 Dec 2011
Total Posts: 489
13 Jul 2016 08:34 PM
bump
Report Abuse
JuuRanium is not online. JuuRanium
Joined: 21 Sep 2011
Total Posts: 113
13 Jul 2016 08:37 PM
1; Test it.
2; Maby is this does not work try p.Parent instead of p.Name
Report Abuse
ninjabeast0117 is not online. ninjabeast0117
Joined: 19 Dec 2011
Total Posts: 489
13 Jul 2016 08:39 PM
i want to see it works with both boxes the first box does
Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
13 Jul 2016 08:41 PM
No changing guis in the startergui will not affect the player right away.
I'm not entirely sure what Player1 or Player2 is. Is it a Frame? TextLabel? or are you trying to reference the player as they join.
Also you might want to add some wait(x) so it doesn't change the text rapidly.

Try using:
local players = game.Players:GetChildren()
for _,v in pairs(players) do
v.PlayerGui --and so on to your gui and frame/textlabel/button
end


Report Abuse
ninjabeast0117 is not online. ninjabeast0117
Joined: 19 Dec 2011
Total Posts: 489
13 Jul 2016 08:43 PM
1. text labels

2. it doesn't need to affect the player. it just needs to show the names in two text boxes as of now.

3. the first box does work but i have no one to test with so i can't see if second box does work
Report Abuse
LMaDforthewinlol is not online. LMaDforthewinlol
Joined: 27 Nov 2015
Total Posts: 10069
18 Apr 2017 04:24 AM
no it wont :(


-caitphish'ss's's oficila alternate acc ||| 10k posts
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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