Tool = script.Parent
x = script.Parent.batteryv --A number value
player = game.Players:findFirstChild("" ..Tool.Parent.Name) --But it is not a nil value! Player is already tagged correctly.
wait(6)
if x.Value ~= 1 then
script.Parent.Handle2.Transparency = 1
wait()
script.Parent.guiscript.Disabled = true
wait()
player.PlayerGui.ScreenGui.ImageLabel.BackgroundTransparency = .25 --It's keep saying this: "Workspace.Flashlight.battery:13: attempt to index global 'player' (a nil value)"
wait()
x.Value = 0 |