I’m currently in the last steps of my lockdown system but the only thing wrong is that an infinite yield is occurring and I’m unsure on how to stop this. I’ve tried adding a wait but it waits then still yields infinitely?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local LockdownEvent = ReplicatedStorage:WaitForChild("LockdownEvent")
local function onLockdownEvent(action)
if action == "start" then
wait(2)
game.StarterGui.ScreenGui.Frame.Visible = true
end
if action == "end" then
wait(2)
game.StarterGui.ScreenGui.Frame.Visible = false
end
end
