Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to fix a script that spawns a npc on a certian time?

Asked by
hokyboy 270 Moderation Voter
5 years ago
while true do
    if game.Lighting.TimeOfDay.Value == 14    then do
        game.ServerStorage.Rich:Clone().parent = game.Workspace

    if game.Lighting.TimeOfDay == 6:00 then do
    game.ServerStorage.Rich:Clone().Parent = game.Workspace 
    end
    end
    end
    end
end

How to fix this?

0
TimeOfDay is a string. Your code at line 5 is a syntax error. 6:00 isn't a value, colon's are used to call functions. Also, why do you have 2 extra end statements? You also need to wait in your while statement. Use 'wait' pidgey 548 — 5y

Answer this question