Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Why is this script not working?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

You might have of forgotten this:

game:GetService("PointsService")
Ad
Log in to vote
0
Answered by 10 years ago
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"
0
It isnt case sensitive with this, though Tempestatem 884 — 10y
0
oh ok chabad360 34 — 10y

Answer this question