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: Confused. Might be simple.

Previous Thread :: Next Thread 
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 06:43 PM
players = {game.Players:GetChildren().Name}
for i,guis in pairs(game.ServerStorage.udontseethis.udontseethis:GetChildren()) do
for v = #players, 10, 1 do
guis.Text = players[i]
print("done "..i)
end
end
Error: String expected on line 4.
help


-spooky-
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
06 Jan 2015 06:45 PM
guis.Text = players[i].Name
Report Abuse
BowtieMod is not online. BowtieMod
Joined: 01 Apr 2013
Total Posts: 804
06 Jan 2015 06:45 PM
guis.Text = players[i].Name

Assign the player name, not the player
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 06:48 PM
Helped a bit. Now it says:
6:47:08.607 - Players.Player.PlayerGui.mafiagui.mafiagui.Script:4: attempt to index field '?' (a nil value)
still not sure.

Is it that I'm testing in Studio?


-spooky-
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 06:49 PM
It's the same script, forgot to replace the name in the forum. Focus more on the index field '?' thing.


-spooky-
Report Abuse
BowtieMod is not online. BowtieMod
Joined: 01 Apr 2013
Total Posts: 804
06 Jan 2015 06:49 PM
Just means that it tried to access a non-existant player

for v = #players, 10, 1 do

There may not be a player 10.
Report Abuse
DoAndDoOver is not online. DoAndDoOver
Joined: 06 Sep 2014
Total Posts: 628
06 Jan 2015 07:00 PM
local players = game.Players:GetPlayers()
local guis = game.ServerStorage.udontseethis.udontseethis:GetChildren()
for i, gui in pairs(guis) do
for index, player in pairs(players) do
gui.Text = player.Name
end
end

?

idk exactly what you are trying to do, but that might fix some problems
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Jan 2015 07:02 PM
Did you guys not notice this...?

'players = {game.Players:GetChildren().Name}'
Report Abuse
DoAndDoOver is not online. DoAndDoOver
Joined: 06 Sep 2014
Total Posts: 628
06 Jan 2015 07:03 PM
I did, so I wrote a dif script.
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 07:10 PM
@Do

Thanks, that got past that problem. Will have to work a little more on it to edit it how i need to but it works.


-spooky-
Report Abuse
DoAndDoOver is not online. DoAndDoOver
Joined: 06 Sep 2014
Total Posts: 628
06 Jan 2015 07:12 PM
Alright, I am still learning but I am pretty good with loops.

Test stuff out and if you run into a wall, come back.
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 07:16 PM
Alright, problem. For whatever reason the script isn't wanting to update the text on the textbuttons I have.

Here's the updated script.

local players = game.Players:GetPlayers()
local guis = game.ServerStorage.mafiagui.mafiagui:GetChildren()
for index, player in pairs(players) do
for i, gui in pairs(guis) do
if gui:IsA("TextButton") then
gui.Text = player.Name
print(player.Name)
print(gui.Name)
end
end
end



-spooky-
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
06 Jan 2015 07:17 PM
Prints all of the names.


-spooky-
Report Abuse
xDeathBear is not online. xDeathBear
Joined: 09 Jul 2010
Total Posts: 1657
12 Jan 2015 06:15 PM
I started over and am still having this problem. Might be easier to fix now.

local player = script.Parent
local players = {game.Players:GetPlayers()}
local guis = player.PlayerGui.mafiagui.mafiagui:GetChildren()

for i,gui in pairs(guis) do
if players[gui.Name] then
gui.Text = players[gui.Name]
end
end

The gui is named 1,2,3 etc


-spooky-
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