Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make my light part turn into neon? It wont do it!!

Asked by 6 years ago
Edited 6 years ago

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



1 answer

Log in to vote
0
Answered by 6 years ago

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.

0
Additionally, his ends are Ends. A good amount of programming languages are case sensitive. M39a9am3R 3210 — 6y
0
ye EliteJcoombs 77 — 6y
Ad

Answer this question