Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Okay. nothing happens now. How do i make the bulbs glow?

Sorry if i keep on asking about the same script, but i finally solved the boolean problem. But this time, this doesn't show an error. I don't know what's happening here, but nothing is happening, the light doesn't glow.

local lighting = game:GetService("Lighting")

local clocktime = lighting:GetMinutesAfterMidnight()
local light = script.Parent
local bulb = script.Parent.Parent

local ntime = 1080
local offtime = 360

print(clocktime)
while (clocktime>=ntime or clocktime<=offtime) do
	light.Enabled = true
	bulb.Material = ("Neon")
end

1 answer

local lighting = game:GetService("Lighting")

local clocktime = lighting:GetMinutesAfterMidnight()
local light = script.Parent
local bulb = script.Parent.Parent

local ntime = 1080
local offtime = 360

print(clocktime)
while clocktime>=ntime or clocktime<=offtime do -- remove the ()
    light.Enabled = true
    bulb.Material = ("Neon")
end

Try this. I don't think you need the "()" there.

3 comments

0

I actually did that. It still doesn't work. I've done everything to function that...

0

Did you try removing the () for the material on line 13?

0

I think the () is necessary for line 13. But the thing is, i attempted to debug by printing the "clocktime" whenever that clocktime is greater or less than "ntime" and "offtime" respectively.

This discussion is preserved as it was. New answers, comments, and votes are closed.