I am still a Rookie scripter. And I am trying to make a light script with a Part. But the material won't change to Neon... Can some of you please look at my script?
local Pointlight = Lightpart.Pointlight local Part.Script.Parent while true do wait(0.1) if game.Lighting.GetMinutesAfterMidnight () > 7 * 60 then Lightpart.material = Enum.Material.Plastic pointlight.Enabled = false End if game.ligthing.GetMinutesAfterMidnight () > 18 * 60 then Lightpart.material = Enum.Material.Neon pointlight.Enabled = true End End
First, correctly label your variables.
Also, use output to see your script errors and what's wrong with it.
Also, use partnamehere.Material = "Neon" instead of Material.Neon
Lastly, make sure to capitalize and lowercase everything to the exact, for example, your "material" should be "Material" unless it's a variable.