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 » Scripting Helpers
Home Search
 

Re: How to find a player's current player points

Previous Thread :: Next Thread 
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 04:33 PM
How do I find how many player points a player has?
Report Abuse
Bobobob12 is not online. 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
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
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
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 04:49 PM
bumpity bump 1
Report Abuse
eLunate is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 05:46 PM
@eLun That didnt work. Should the script be a server side script in Workspace?
Report Abuse
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 05:47 PM
I fixed your brainfarts.
Report Abuse
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 05:49 PM
You didn't make the I in userId capital. It has to be capital bro.
Report Abuse
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
20 Sep 2014 05:49 PM
Nevermind, of course it didnt work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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