zombies = game.ServerStorage.zombs:Clone()
if game.Lighting.TimeOfDay == "19:00:00" then
zombies.Parent = game.Workspace
end
where zombs is a model full of zombies?
zombies = game.ServerStorage.zombs:Clone()
if game.Lighting.TimeOfDay == "19:00:00" then
zombies.Parent = game.Workspace
end
where zombs is a model full of zombies?
This should be working, maybe the map is teleporting into workspace but you can't see it, in that case use the MoveTo() Method to move to your liking,
Also you can put your map in lighting, it might help, but this script should work.
It probably is working, it's just not doing what you expect it to do. This script will only check the TimeOfDay once, and that's when the script first runs. So if it's not 19:00:00 when the script runs, it doesn't put the zombies in Workspace. I'd do something like this-
local Lighting = Game:GetService("Lighting")
local Storage = Game:GetService("ServerStorage")
Lighting.LightingChanged:connect(function()
-- midnight = 00:00:00
-- 19:00:00 is 1140 minutes after midnight
if Lighting:GetMinutesAfterMidnight() == 1140 then
-- Spawn zoms model
local zoms = Storage:FindFirstChild("zoms"):Clone()
zoms.Parent = Workspace
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
is it in a localscript? if it is then localscripts cant acces serverstorage on online mode
nope, its in an ordinary script