local Points = game.Players.LocalPlayer:WaitForChild("stats"):WaitForChild("Points")
local Opened = script.Parent.Parent.Parent.Opened -- Is a bool value
local TextLabel = script.Parent
while Opened.Value == true do
TextLabel.Text = "POINTS : " .. Points.Value
wait(1)
end
I don't really have that much to explain.. this script is supposed to change the text of the textlabel while opened is true. The script works if i just change it to while true do so i guess the problem is while Opened.Value == true do, it doesn't show any errors.

3 comments
Or you could also do, while true do, then inside, you can add a 'if Opened.Value == true then', or you can do what cherrythetree recommended.
Use the Changed event.
Wow cherrythetree. Just wow.