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

Why is this script not working?

This script works, but it will not update. I have it set to update every 5 seconds

local PointsService = Game:GetService("PointsService")
 
while true do 
	wait(5)

	script.Parent.Text = "There are " .. PointsService:GetAwardablePoints().. " player points left!"
end

Oh yes I forgot output. It tells me (In game output) that PointsService is unavailable.

I fixed it, so all is well

2 answers

✓ Accepted answer

You might have of forgotten this:

game:GetService("PointsService")
local PointsService = game:GetService("PointsService") -- lua is case-sensitive its not spelled "Game" but "game"

while true do 
    wait(5)-- this needs to be here or it will glitch(well not really but you'll get a infinite loop of updating)
 script.Parent.Text = "There are " .. PointsService:GetAwardablePoints().. " player points left!"
end
--also PointsService doesn't work with studio yet until its released from beta 'cause my output said"PointsService requires beta access"

2 comments

0

It isnt case sensitive with this, though

0

oh ok

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