This is the script
local PointLight = game.Workspace.Lamp.Union.PointLight
local battery = 60
local lamp = game.Workspace.Lamp.Union
local timer = script.Parent.Timer
local plr = game.Players.LocalPlayer
while true do
wait()
if PointLight.Enabled == true then
battery = battery - 1
print(battery)
wait(1)
timer.Text = battery -- i think problem is here
end
if battery == 50 then
print("Lamp Break")
lamp.PointLight:Destroy()
lamp.Break:Play()
lamp.Script.Disabled = true
lamp.Material = 'Sand'
lamp.Script.Disabled = true
wait(0.1)
break
end
end
Solution is probably simple but i can't seem to find it.

1 comment
Error code is the title btw.