So basically I made a script that puts a brick in a random spot on the map using math.random. The problem is that it doesn't work when I tested it.
local locations = math.random(1,2)
while true do
wait(.5)
if game.Lighting.TimeOfDay == "02:00:00" or game.Lighting.TimeOfDay == "01:00:00" or game.Lighting.TimeOfDay == "00:00:00" then
if locations == 1 then
clone = script.Parent:Clone()
clone.Position = clone.Position + Vector3.new("232.572, 10.875, 384.915")
if game.Lighting.TimeOfDay == "14:00:00" then
clone:remove()
if locations == 2 then
clone2 = script.Parent:Clone()
clone2.Position = clone2.Position + Vector3.new("-8.428, 10.875, 244.915")
if game.Lighting.TimeOfDay == "14:00:00" then
clone2:remove()
end
end
end
end
end
