I need it so that my lantern has a bar that slowly goes down, and when the bar is totally decreased the point light brightness will be 0 instead of 10. The player needs to touch a block so that the bar will be filled up and the light will come back on.
You could use a NumberValue to help edit the GUI
and using if and then like
if script.Parent.StringValue == 0 then script.Parent.PointLight.Enabled = false
so insert a : Tool PointLight Part (name it Handle) script x2 fire (just for cosmetic reasons) numbervalue (name the value Oil and set the number to 100)
:: now the GUI you can use after you get every set up also go to the roblox set called weapons drag a sword into the workspace and take the script called **Local GUI and put it into the tool you put into workspace then delete the sword
the script will look like this
while wait() do if script.Parent.Oil.Value == 0 then script.Parent.Handle.PointLight.Enabled = false script.Parent.Handle.Fire.Enabled = false elseif script.Parent.Handle.Fire.Enabled == true then script.Parent.Handle.PointLight.Enabled = true end end
alright now the 2nd script you put it in the number value and then edit the script to look like this
while wait(5) do script.Parent.Value = script.Parent.Value -1 end
and there's your basic lantern (the GUI you'll have to figure out yourself)