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

How do I fix My script?(disable/enable spawns at time)

Asked by 6 years ago
Edited 6 years ago

I was trying to make the spawns disable and enable at different times. The script below is my time script (it changes the time every .5 seconds) and I am trying to make the pads disable and enable

local mam = 12 * 60
while true do
    game.Lighting:SetMinutesAfterMidnight(mam)
    mam = mam + 1
    wait(.5)
    print (mam)
end

if mam == 13 * 60 then
    workspace.YardPS.Enabled = true else
    workspace.YardPS.Enabled = false
end

if mam == 12 * 60 then
    workspace.RPS.Enabled = true else
    workspace.RPS.Enabled = false
end

I have it in my serverscriptservice

1 answer

Log in to vote
0
Answered by 6 years ago

Put the two if statements inside the while loop

0
i have tried that before i came here and it did not work fireburnpokemon 16 — 6y
Ad

Answer this question