Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I can't find a way for people to get Player Points when they click a block?

Asked by 10 years ago

No one has bought any of my stuff yet but, I heard about the new infinite PP system. I have also used ClickDetector on my block and I have attempted to connect to a script which will give them player points.

1 answer

Log in to vote
0
Answered by 10 years ago
script.Parent.MouseClick:connect(function(playerWhoClicked)
    local Reward = 1
    if playerWhoClicked.Character:findFirstChild("Humanoid") then
    game:GetService("PointsService"):AwardPoints(playerWhoClicked.userId, Reward)
    end
end)

-- I have not tested this. Put this in a Click Detector.

0
Why did you downvote me? It works! drslicendice 27 — 10y
0
Thanks, I'll try it. minecraftia277 0 — 10y
0
Can I have more info? minecraftia277 0 — 10y
Ad

Answer this question