dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
local NumPlayers = game.Players.NumPlayers
local gamePlayers = script.Parent.gamePlayers
...
gamePlayers.Value = NumPlayers
The IntValue is not changing to the Number of Players. However, I have another script that changes the same IntValue but it changes it in that script! |
|
|
The variable NumPlayers is getting the number of players at the current time. You should back up the Variable to Game.Players. then later do Players.NumPlayers
local Players = game.Players
local gamePlayers = script.Parent.gamePlayers
gamePlayers.Value = Players.NumPlayers |
|
|
I believe you have to put a "." in between "game" and "Players." Instead of gamePlayers, do "game.Players". It should work |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
^ Lol. |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
Now I'm getting an error on line 13.
line 13: if Players.NumPlayers >= Players then
Output: 18:09:34.045 - Players.Player.PlayerGui.Main.HUD.main:13: attempt to compare userdata with number |
|
instawinJoin Date: 2013-06-04 Post Count: 8777 |
first off, i would rename your Players variable as it could conflict with your Players variable that refers to the Players service.
*if Players.NumPlayers >= yourPlayers.Value
because you were trying to compare NumPlayers with the intvalue object itself, not its value |
|
|
Players is a tracker value not a number.
What are you trying to compare here? |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
I change that however nothing is happening still :l |
|
instawinJoin Date: 2013-06-04 Post Count: 8777 |
you're trying to compare your player's int value itself to NumPlayers. simply put:
*if Players.NumPlayers >= yourRequiredNumOfPlayersIntValue.Value |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
Sorry I must of misworded something. My IntValue is a value inside of the script's parent and it is supposed to be the number of players in the current round. |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
I've tried everything I can think of but nothing is working! |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
bump |
|
dembeIleJoin Date: 2011-11-20 Post Count: 9013 |
bump1337 |
|
|
Did you even try what I said? |
|