So, for my game I am teleporting all of the players into a certain area of my map.
In a separate script I have the time changing.
Here is my code:
local target = CFrame.new(207.73, 1.5, 4065.287)
local tod = game.Lighting.TimeOfDay
game.Lighting.Changed:connect(function(TimeOfDay)
if tod == "00:03:20" then
print("Time if passed.")
for i, player in ipairs(game.Players:GetChildren()) do
if player.Character and player.Character:FindFirstChild("Torso") then
print("char check and torso check passed.")
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
end
end
end
end)
So, am I just using time of day wrong? I'm thinking the if statement isn't working but I'm not sure how to fix it.
Oh and, there are also no errors

1 comment
Thanks dude! With a few changes, this has ended up working perfectly.