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
 

Player Points?

Previous Thread :: Next Thread 
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
07 Mar 2015 10:50 PM
Hey, im trying to add player points to a game of mine, I have the localscript below in a experience system. It says in the system if blahblah.Ammount.Text = "100/100" then its got the reset thing, How can I make it give 100 player points at the same time? Ive tried the wiki for player points and can't figure it out. Thanks, Cold.

while true do
local xp = script.Parent.Parent.Parent.Parent.GameInfo.Experience.Value
local level = script.Parent.Parent.Parent.Parent.leaderstats.Level.Value
local player = script.Parent.Parent.Parent.Parent
script.Parent.Bar.XP:TweenSize(UDim2.new(xp/100,0,1,0),"Out","Quad",0.5)
script.Parent.Bar.Ammount.Text = xp.."/100"
script.Parent.Level.Text = level.. ""
if script.Parent.Bar.Ammount.Text == "100/100" then
script.Parent.Parent.Parent.Parent.GameInfo.Experience.Value = 0
script.Parent.Parent.Parent.Parent.leaderstats.Level.Value = script.Parent.Parent.Parent.Parent.leaderstats.Level.Value + 1
wait()
else
wait()
end
end
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
07 Mar 2015 11:21 PM
Bump[1]
Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
07 Mar 2015 11:22 PM
wait(1/30)
end
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
07 Mar 2015 11:41 PM
What?? Im lost.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
07 Mar 2015 11:52 PM
local service = Game:GetService("PointsService");
PointsService:AwardPoints(player.userId, 99999);
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
07 Mar 2015 11:53 PM
my bad

local service = Game:GetService("PointsService");
service:AwardPoints(player.userId, 99999);
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
07 Mar 2015 11:55 PM
Not working.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
07 Mar 2015 11:56 PM
local service = Game:GetService("PointsService");
service:AwardPoints(game.Players.LocalPlayer.userId, 100);
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
07 Mar 2015 11:58 PM
Is it something in this layout?

while true do
local xp = script.Parent.Parent.Parent.Parent.GameInfo.Experience.Value
local level = script.Parent.Parent.Parent.Parent.leaderstats.Level.Value
local player = script.Parent.Parent.Parent.Parent
script.Parent.Bar.XP:TweenSize(UDim2.new(xp/100,0,1,0),"Out","Quad",0.5)
script.Parent.Bar.Ammount.Text = xp.."/100"
script.Parent.Level.Text = level.. ""
if script.Parent.Bar.Ammount.Text == "100/100" then
script.Parent.Parent.Parent.Parent.GameInfo.Experience.Value = 0
script.Parent.Parent.Parent.Parent.leaderstats.Level.Value = script.Parent.Parent.Parent.Parent.leaderstats.Level.Value + 1
local service = game:GetService("PointsService");
service:AwardPoints(player.userId, 99999);
wait()
else
wait()
end
end
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
08 Mar 2015 12:02 AM
Still not working :/
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
08 Mar 2015 12:19 AM
bump[2]
Report Abuse
ChoongJae is not online. ChoongJae
Joined: 10 Oct 2009
Total Posts: 670
08 Mar 2015 12:23 AM
why are you using a while loop for this?
Report Abuse
SMS1337 is not online. SMS1337
Joined: 19 Feb 2014
Total Posts: 10504
08 Mar 2015 12:28 AM
pointsservice only works in a server script


nice meme
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
08 Mar 2015 12:29 AM
A server script is just a regular "script" correct?
Report Abuse
SMS1337 is not online. SMS1337
Joined: 19 Feb 2014
Total Posts: 10504
08 Mar 2015 12:34 AM
yes

change the "while true do" to this
script.Parent.Parent.Parent.Parent.GameInfo.Experience.Changed:connect(function()

remove the waits and change the last end to an "end)"


nice meme
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Mar 2015 12:44 AM
this will be useful for my own game...hmm...
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
09 Mar 2015 12:29 AM
Yeah, Ive moved this all to a server side script (Located in the gui which is in startergui) but its still not giving the points, anyone got a idea why?
Report Abuse
SMS1337 is not online. SMS1337
Joined: 19 Feb 2014
Total Posts: 10504
09 Mar 2015 05:09 PM
add this below the "if script.Parent.Bar.Ammount.Text == "100/100" then"
local pps = game:GetService("PointsService")
pps:AwardPoints(script.Parent.Parent.Parent.Parent.UserId,100)


nice meme xdddd
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