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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
| |
|
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 |
|
|
|
| 01 Dec 2013 07:29 PM |
| Theres not a Player as a child of script.. |
|
|
| Report Abuse |
|
|
gunter5
|
  |
| Joined: 15 Mar 2011 |
| Total Posts: 737 |
|
|
| 01 Dec 2013 08:03 PM |
| yes there is it is a string value |
|
|
| Report Abuse |
|
|