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: Help With Gui's/Text Boxes

Previous Thread :: Next Thread 
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 06:33 PM
i am making a script that will randomly choose a player and then put their name in the text box for the game... for some reason i cant get this script to work can somebody please help me?

Pla = script.Player
choosenew = 10
Name = game.Players:GetChildren().Name

function selectNew()
p = game.Players:GetChildren()
Pla.Value = p[(math.random(1, #p))].Name
Parent.Text = "Vote "..Name.." For Next Hidden?"
wait(1)
end

while true do
selectNew()
wait(choosenew)
end

Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
01 Dec 2013 06:34 PM
Entirely wrong.

-- $$ Get on my level, here use this ladder. Don't fall down on the way up! $$ --
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 06:35 PM
well can you tell me how i would do this?
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 06:39 PM
Pla = script.Player
choosenew = 10
Name = game.Players:GetChildren().Name

function selectNew()
p = game.Players:GetChildren()
Pla.Value = p[(math.random(1, #p))].Name
Parent.Text = "Vote "..Name.." For Next Hidden?"
wait(1)
end

while true do
selectNew()
wait(choosenew)
end


'Player' is the name of the value im using that is in this script
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
01 Dec 2013 06:47 PM
function selectNew()
playerss = Game.Players:GetPlayers()
namelist ={ }
for i=1, #playerss do
table.insert(namelist, playerss[i])
local randomplayer = math.random(1, #namelist)
h=Instance.new("Hint", Workspace)
h.Text = "Vote "..namelist[randomplayer].."for next hidden?"
end
end

while wait(10) do
selectNew()
end


-- $$ Get on my level, here use this ladder. Don't fall down on the way up! $$ --
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 06:51 PM
thank you!!! ^-^
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 07:18 PM
ok i tested this and it didnt work i need it to change the text of the textlabel which is the parent of the script i made can you help me with this please?
Report Abuse
crazyfireball2002 is not online. crazyfireball2002
Joined: 27 Sep 2010
Total Posts: 275
01 Dec 2013 07:29 PM
Theres not a Player as a child of script..
Report Abuse
gunter5 is not online. gunter5
Joined: 15 Mar 2011
Total Posts: 737
01 Dec 2013 08:03 PM
yes there is it is a string value
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