The Propose of the script is to give a player a spotlight, and then count down a battery number value to 0, then disable the light. But it unfortunately its not working, any idea why? Code:
local plr = game.Players.LocalPlayer
local char = plr.Character
local sp = script.Parent
local mouse =plr:GetMouse()
L = Instance.new("SpotLight")
L.Parent = char.Torso
L.Brightness = 10
L.Range = 20
if sp.Parent.Battery ~= nil then
while sp.Parent.Battery.Value = 0< do
sp.Parent.Battery.Value = sp.Parent.Battery.Value -1
until sp.Parent.Battery.Value = 0
if sp.Parent.Battery.Value = 0 then
char.Torso.SpotLight.Enabled = false
end
end

1 comment
its still not changing for me