如何解决 Roblox Studio 中时停问题?

local model = game.ReplicatedStorage.BaconEvent
local InUse = game.ReplicatedStorage.BaconEvent.InUse
local sound = workspace.BaconTimeStop
local bacon = {}
local resume = workspace.StarPlatinumResume
local clock = workspace.Clock
local Stand = game.ServerScriptService.Summon.Stand

model.BaconTimeStop.OnServerEvent:Connect(function(player)
    local find = workspace:GetDescendants()
    if model.InUse.Value == false then
        model.InUse.Value = true
        sound:Play()
        wait(2)
        clock:Play()
        game.Lighting.BaconTime.Enabled = true
        for i=1, #find do
            local That = find[i]
            if That:IsA("Part") or That:IsA("MeshPart") then
                if That.Anchored == false and That.Parent.Name ~= player.Name and That.Name ~= "Baseplate" and not That.Parent:IsA("Accessory") then
                    That.Anchored = true
                    table.insert(bacon, That)


                elseif model.InUse.Value == true then
                wait(5)
        resume:Play()
        wait(1)
        model.InUse.Value = false
        game.Lighting.BaconTime.Enabled = false
        for i=1, #bacon do
            bacon[i].Anchored = false
        end
        table.clear(bacon)
                    end
                end
            end
        end
    end)

由于某种原因它只有在时停结束后才能停止时间。 我无法自己解决,希望有人知道如何修复。 注:baconevent 是颜色校正部件。

点赞