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

Will this work properly?

What this code should do, is award every player in the server 1 PP every 10 minutes:

local PPS = game:GetService("PointsService")
while PPS:GetAwardablePoints() >= game.Players.NumPlayers do
	for i,v in pairs (game.Players:GetChildren()) do
		PPS:AwardPoints(1,v.userId)
	end
	wait(10*60)
end

1 answer

while wait(60*10) do
local PPS = game:GetService("PointsService")
if PPS:GetAwardablePoints() >= game.Players.NumPlayers then
for i,v in pairs(game.Players:GetChildren()) do
PPS:AwardPoints(1,v.userId)
end
end
end

It does it every 600 seconds, this works much better as time in my opinion should be used for the while wait() do key and then award after that long. However, if you wanted you could create a countdown timer that is a bit more difficult however it allows for some room of functions under it. But for this way your using I doubt you need that.

2 comments

0

I put this script in Workspace, so I think it should be fine right??

0

Yes, it should work in workspace, make sure that it's a script not a local script. Also please give me a reputation!

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