storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
|
| 24 Nov 2016 07:44 PM |
"points is not a valid member of Folder"
function PointUpdate() if stats.WinningPlayer.Value == lplr.Name then other = stats.SecondInPlace.Value else other = stats.WinningPlayer.Value end local pp = pstats[gp.Name..'points'].Value game.Players.LocalPlayer.PlayerGui.HUD.Leaderboard.Two.Points.Text = pp UpdatePointGui() local op = pstats[other..'points'].Value game.Players.LocalPlayer.PlayerGui.HUD.Leaderboard.One.Points.Text = op end
It's the "OP" section that's erroring. I think it's the way I search for the points. Basically, players have their points in a value inside of a folder named "Namepoints" where Name is... their name.
It's only searching for the "points" part though, and I don't know why. I know my method of searching is probably the issue but I don't know how to fix it. |
|
|
| Report Abuse |
|
|
jojo8764
|
  |
| Joined: 27 Nov 2012 |
| Total Posts: 1239 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
|
| 24 Nov 2016 09:44 PM |
| replicatedstorage. I don't think it's the issue of where it's located, just getting the name "playernameherepoints" because it just searches for "points" which doesn't exist |
|
|
| Report Abuse |
|
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 26 Nov 2016 11:19 AM |
| What is Winning player and SecondInPlace? Object values? string values? Also, post your output |
|
|
| Report Abuse |
|
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
|
| 26 Nov 2016 11:38 AM |
WinningPlayer and SecondInPlace are strings that are the respective player's name.
So let's say the person with the most points is Player1, WinningPlayer will have a string of "Player1"
So I'm searching for the folder that stores all their points, like Player1..'points
Output:
12:37:40.502 - points is not a valid member of Folder
|
|
|
| Report Abuse |
|
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
| |
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 26 Nov 2016 02:08 PM |
Use :WaitForChild() on the folder.
|
|
|
| Report Abuse |
|
|
storm_xst
|
  |
| Joined: 27 Jul 2016 |
| Total Posts: 1205 |
|
|
| 26 Nov 2016 07:55 PM |
I suppose that would make sense, but the issue is points not being found, not the folder.
I'm 99% POSITIVE that it's the way I'm searching for the player's points. I just don't know how to do it correctly. |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 26 Nov 2016 09:51 PM |
"points is not a valid member of Folder"
Not sure which line this is addressing. It's either
local pp = pstats[gp.Name..'points'].Value Or local op = pstats[other..'points'].Value
Depending on which line the error is pointing to. What's being concatenated with the string "other", though, is an empty string, aka, either gp.Name is "", or WinningPlayer is "". Perhaps in the if statement, check if the WinningPlayer value is equal to "", and if so, act correspondingly. |
|
|
| Report Abuse |
|
|