This code is in a server script and I want the part to change when It is night time. and metal material when it is day.
while true do local timeofday = tonumber(game.Lighting.ClockTime) if timeofday >= 18 or timeofday <= 6 then game.Workspace.Part.Material = Enum.Material.Neon elseif timeofday <= 18 and timeofday >= 6 then game.Workspace.Part.Material = Enum.Material.Metal end wait() end