My main goal is for specific parts on a building to become visible when the time is around 18 in the clock time and then become transparent (not-visible) when the clock time is around 6.1,
Is this possible in anyway?
My main goal is for specific parts on a building to become visible when the time is around 18 in the clock time and then become transparent (not-visible) when the clock time is around 6.1,
Is this possible in anyway?
Here you go. Hope this works.
local part = game.Workspace.Part
while true do
local hour = tonumber(string.sub(game.Lighting.TimeOfDay,1,2))
local dark = false
if hour <= 6.1 or hour >= 18 then
dark = true
end
if dark == true then
part.Transparency = 0
end
if dark == false then
part.Transparency = 1
end
end
this script will break right after starting as while loop without debounce will run with speed of light causing it to break, add debounce to it.
you forgot to add a wait(), so it wont work :)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
You can maybe using Lighting and use greater than and less than? I'll send a script with an answer in a minute or two..