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

How do I make a script which you get player points when you join the game?

I need help finding and making the script.

2 answers

This is the script it will work if you have playerpoint's left in the server.

Source: Roblox Wiki (Maybe you should check that instead of us giving you the answers and you doing no effort!)

Click here to see the link

-- First declare the  service
local PointsService = Game:GetService("PointsService")
 
-- Bind function to player added event
game.Players.PlayerAdded:connect(function(player)
	
	local pointsToAward = PointsService:GetAwardablePoints()
	
	local universeBalance = PointsService:GetGamePointBalance(player.userId)
	
	if ( pointsToAward > 0 and universeBalance == 0) then
		pcall(function()
			PointsService:AwardPoints(player.userId, 1) -- Change this to how many points you want them to earn!
		end)
	end
end)
 
-- Bind function to when points are successfully awarded
PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance)
	-- Show message indicating that a player has gotten points
	local message = Instance.new('Message', game.Workspace)
	message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!"
	wait(5)
	message:Destroy()
end)

If this helped,

1 up me!

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