|
| 20 Sep 2014 04:33 PM |
| How do I find how many player points a player has? |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 20 Sep 2014 04:35 PM |
local player = game.Players.JOJObuddy011; local points = game:GetService("PointsService"):GetPointBalance(player.userId); print(points); |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2014 04:45 PM |
That didnt work. This is my current script:
while true do wait(1) local player = game.Players.LocalPlayer; local points = game:GetService("PointsService"):GetPointBalance(player.userId); script.Parent.Text = "You currently have " .. points .. " player points." end |
|
|
| Report Abuse |
|
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 Sep 2014 05:20 PM |
| Local player is only available to local scripts, but the point service needs to be accessed from a server script. |
|
|
| Report Abuse |
|
|
Sinblade
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 2782 |
|
|
| 20 Sep 2014 05:21 PM |
script.Players.PlayerAdded:connect(function(player) while true do wait(1) local points = game:GetService("PointsService"):GetPointBalance(player.userId); script.Parent.Text = "You currently have " .. points .. " player points." end end)
idk if that would work but it might |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 Sep 2014 05:28 PM |
It would be game.Players.PlayerAdded:connect(function(p) T = p.PlayerGui.ScreenGui.TextLabel while wait(1) do T.Text = game:GetService("PointsService"):GetPointBalance(player.userid) end end |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 Sep 2014 05:29 PM |
| But of course I had a brain fart and minor lapse in concentration half way through and did player.userid instead of p.userid and forgot the ) after end |
|
|
| Report Abuse |
|
|
Sinblade
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 2782 |
|
|
| 20 Sep 2014 05:31 PM |
lun can you look at my script?
http://www.roblox.com/Forum/ShowPost.aspx?PostID=146457140 |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2014 05:46 PM |
| @eLun That didnt work. Should the script be a server side script in Workspace? |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Sep 2014 05:49 PM |
| You didn't make the I in userId capital. It has to be capital bro. |
|
|
| Report Abuse |
|
|
|
| 20 Sep 2014 05:49 PM |
| Nevermind, of course it didnt work. |
|
|
| Report Abuse |
|
|