Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Player points gui help?

-- In LocalScript --

local PointsService = Game:GetService("PointsService")
local productId = 21263542
local players = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	Game:GetService("MarketplaceService"):PromptProductPurchase(players, productId)
	game.Players.PlayerAdded:connect(function(player)
		while wait(1) do
			local pointsToAward = PointsService:GetAwardablePoints()
			if ( pointsToAward >= 100) then 
				pcall(function()
					PointsService:AwardPoints(player.userId, 100) 
				end)
			end
		end
	end)
end)

I have this set so when you buy a tip to support my game you get some player points in return. I just want them to get 100 but it wont award them it. The game has 1200 so to my mind it should work but dosent want to.

1 answer

✓ Accepted answer

Because PlayerPoints cant be awarded from PlayerGui

This discussion is preserved as it was. New answers, comments, and votes are closed.