Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

Put the two if statements inside the while loop

1 comment

0

i have tried that before i came here and it did not work

This discussion is preserved as it was. New answers, comments, and votes are closed.