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: Need a bit of help with the new player points.

Previous Thread :: Next Thread 
lomo0987 is not online. lomo0987
Joined: 31 May 2008
Total Posts: 2461
24 Apr 2014 05:48 PM
Here is the script that I am using..


local PointsService = Game:GetService("PointsService")
local ting = 0

function onTouched(hit)

if ting == 0 then
ting = 1
check = hit.Parent:FindFirstChild("Humanoid")

if check ~= nil then

local user = game.Players:GetPlayerFromCharacter(hit.Parent)
local stats = user:findFirstChild("leaderstats")

if stats ~= nil then
local cash = stats:findFirstChild("Cash")
cash.Value = cash.Value - 20000
PointsService:AwardPoints(player.userId, 1)

wait(5)
end

end

ting = 0
end

end

script.Parent.Touched:connect(onTouched)

It doesn't give any points after it takes the cash and it breaks. I believe I set it up wrong but as it's new I have no idea how to do it. (Wiki doesn't have any information that useful for this)
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
24 Apr 2014 05:50 PM
You have a limit of Player Points to award.

Lets say someone buys your gamepass for 100 robux. 70 robux is given to you after the fee subtracts 30% and 70 Player Points is generated in your place to award.
Report Abuse
lomo0987 is not online. lomo0987
Joined: 31 May 2008
Total Posts: 2461
24 Apr 2014 05:53 PM
My game has over 30,000 player points. I know how they work. But I just don't know how to script it.
Report Abuse
lomo0987 is not online. lomo0987
Joined: 31 May 2008
Total Posts: 2461
24 Apr 2014 06:01 PM
Could anyone help?
Report Abuse
CIassicGameRestorer is not online. CIassicGameRestorer
Joined: 08 Jul 2011
Total Posts: 3070
24 Apr 2014 06:03 PM
Have you tried turing it on and off again?
Report Abuse
lomo0987 is not online. lomo0987
Joined: 31 May 2008
Total Posts: 2461
24 Apr 2014 06:21 PM
Anyone?
Report Abuse
lomo0987 is not online. lomo0987
Joined: 31 May 2008
Total Posts: 2461
24 Apr 2014 06:52 PM
No one?
Report Abuse
iOffensive is not online. iOffensive
Joined: 13 Jun 2013
Total Posts: 416
24 Apr 2014 07:13 PM
Try this


local PointsService = Game:GetService("PointsService")
local ting = 0

function onTouched(hit)

if ting == 0 then
ting = 1
check = hit.Parent:FindFirstChild("Humanoid")

if check ~= nil then

local user = game.Players:GetPlayerFromCharacter(hit.Parent)
local stats = user:findFirstChild("leaderstats")

if stats ~= nil then
local cash = stats:findFirstChild("Cash")
cash.Value = cash.Value - 20000
PointsService:AwardPoints(user.userId, 1) -- You were originally awarding it to 'player', and that wasn't specified in the script

wait(5)
end

end

ting = 0
end

end

script.Parent.Touched:connect(onTouched)
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