The Player Point Script I have is not working, am I missing something on that script?
I've been doing researches on my own, yet the only thing Roblox's shows me is a Player Point Script when you JOIN a game
That's the script I added in my place. (Kill a required amount of players to get PP)
01 | PointsService = game:GetService( "PointsService" ) |
04 | game.Players.PlayerAdded:connect( function (p) |
05 | repeat wait() until p:FindFirstChild( "leaderstats" ) ~ = nil |
06 | print ( "Found \"leaderstats\" object!" ) |
07 | repeat wait() until p.leaderstats:findFirstChild(Stat) ~ = nil |
08 | print ( "Found " ..Stat.. " object!" ) |
09 | p.leaderstats [ Stat ] .Changed:connect( function (prop) |
10 | print ( "Value changed!" ) |
11 | if prop > = Needed then |
12 | game:GetService( "PointsService" ):AwardPoints(p.userId, 10 ) |
(I did added the linked Leaderboard, and a linked sword.)
And also I did installed the script How many PP are available to get.
1 | local service = game:GetService( "PointsService" ) |
3 | game.Players.PlayerAdded:connect( function (player) |
4 | player:WaitForDataReady() |
5 | service:AwardPoints( 500 , service:GetAwardablePoints()) |
Yet it's still not working, and I tried to find some help on YouTube and almost everywhere I could look, I still come with nothing.
Does anyone know what I'm doing wrong?