I want to make a Street light post
Workspace.Lightposts.Script:2: attempt to compare string < number
I tried using >= and <= and < and > but nothing worked.
The script:
while true do
if game.Lighting.TimeOfDay < 6.3 or game.Lighting.TimeOfDay > 17.6 then
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Model" then
v.Part.SpotLight.Enabled = true
end
end
else
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Model" then
v.Part.SpotLight.Enabled = false
end
end
end
wait(0.1)
end
Could anyone please help me solve this problem?