When the player touches the part that the script is in, they should get awarded 3 player points, but the script won't work. Do you know why?
local PointsService = Game:GetService("PointsService")
function onTouched(hit)
local pointsToAward = PointsService:GetAwardablePoints()
if pointsToAward > 0 then
PointsService:AwardPoints(player.userId, 3)
end
end
script.Parent.Touched:connect(onTouched)
|